# utility of DIURNAL\_INPUT\_SRFLX option in PISCES

**URL:** <https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231>\
**Category:** biogeochemistry\
**Tags:** biogeochemistry\
**Created:** [November 2, 2020, 1:39pm UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231 "2020-11-02T13:39:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rreboreda](https://forum.croco-ocean.org/letter_avatar_proxy/v4/letter/r/e5b9ba/32.png) [@rreboreda](https://forum.croco-ocean.org/u/rreboreda)\
**Post date:** [November 2, 2020, 1:39pm UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/1 "2020-11-02T13:39:04Z")

</div>

Hi,  
I would like to know what is the purpose of the option DIURNAL\_INPUT\_SRFLX avaliable in cppdefs.h when running PISCES. I get it is something related to the shortwave radiation at the surface, but what does it change activating it? Can anybody help me? Thank you.

---

<div class="post-metadata">

**Author:** ![AndresSepulveda](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/andressepulveda/32/262_2.png) [@AndresSepulveda](https://forum.croco-ocean.org/u/AndresSepulveda)\
**Post date:** [November 2, 2020, 8:38pm UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/2 "2020-11-02T20:38:30Z")

</div>

For what I understand, this option is undefined when using PISCES as it would lead to an overestimation of surface radiation, and thus productivity. Please contact Vincent Echevin (IRD) for more details in this topic.

---

<div class="post-metadata">

**Author:** ![Pedro](https://forum.croco-ocean.org/letter_avatar_proxy/v4/letter/p/919ad9/32.png) [@Pedro](https://forum.croco-ocean.org/u/Pedro)\
**Post date:** [November 6, 2020, 10:10pm UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/3 "2020-11-06T22:10:29Z")

</div>

Hi, in fact, this is to deal with a diurnal cycle, if any, in the solar short-wave radiation imposed in the forcing files (variable radsw in frc/blk files). Short-wave radiation is used to derive the photosynthetic available radiation (PAR) for phytoplankton growth. Since PISCES do not accept PAR=radsw=0 (see PISCES equations), this key must be activated if there is a diurnal cycle in radsw. In that case, another variable (radswbio) is read in the forcing files instead of radsw.  
The variable radswbio is the solar short-wave radiation without diurnal cycle, and this must be specifically pre-processed and included in the forcing files, for example by running “Aforc\_CFSR/add\_radswbio\_CFSR.m” for CFSR data.  
Good luck !

---

<div class="post-metadata">

**Author:** ![rreboreda](https://forum.croco-ocean.org/letter_avatar_proxy/v4/letter/r/e5b9ba/32.png) [@rreboreda](https://forum.croco-ocean.org/u/rreboreda)\
**Post date:** [November 9, 2020, 8:55am UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/4 "2020-11-09T08:55:45Z")

</div>

Thanks a lot for your explanation, Pedro!

---

<div class="post-metadata">

**Author:** ![rreboreda](https://forum.croco-ocean.org/letter_avatar_proxy/v4/letter/r/e5b9ba/32.png) [@rreboreda](https://forum.croco-ocean.org/u/rreboreda)\
**Post date:** [November 9, 2020, 8:57am UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/5 "2020-11-09T08:57:01Z")

</div>

Thanks Andrés, I’ll take that in consideration.

---

<div class="post-metadata">

**Author:** ![amsuhail](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/amsuhail/32/738_2.png) [@amsuhail](https://forum.croco-ocean.org/u/amsuhail)\
**Post date:** [September 18, 2025, 5:01am UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/6 "2025-09-18T05:01:44Z")

</div>

Hello Everyone,

I was trying to do run CROCO with PISCES activated.  
As suggested by @Pedro in this conversation I defined the DIURNAL\_INPUT\_SRFLX option, since my bulk\_forcing file is made using hourly ERA5 data. Also , I added the variable ‘radswbio’ in the bulk\_forcing file.  
But when I am running the model, I am getting the following error:

GET\_BULK - ERROR: unable to find forcing variable: salt\_src  
in forcing NetCDF file: CROCO\_FILES/INPUTS/croco\_blk\_ERA5\_Y1993.nc

I am not understanding why salt\_src is being searched in bulk\_forcing file.

I would appreciate any help regarding this.

Thanks in Advance,  
Suhail

---

<div class="post-metadata">

**Author:** ![slegac](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/slegac/32/267_2.png) [@slegac](https://forum.croco-ocean.org/u/slegac)\
**Post date:** [September 18, 2025, 7:29am UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/7 "2025-09-18T07:29:30Z")

</div>

Hello,

I think it could be a bug due to a mismatch in variables if you are using simultaneously `PSOURCE_NCFILE_TS` and `DIURNAL_INPUT_SRFLX`  
Which version of CROCO do you use ?

If it is 2.1.0 you can try to change in OCEAN/ncscrum.h lines 931

```auto
#ifdef DIURNAL_INPUT_SRFLX
      integer indxShflx_rswbio
      parameter (indxShflx_rswbio=indxSUSTR+124)
#endif

```

by

```auto
#ifdef DIURNAL_INPUT_SRFLX
      integer indxShflx_rswbio
      parameter (indxShflx_rswbio=indxSUSTR+120)
#endif

```

Then recompile and rerun (perhaps it will be another error, it is just a guess fix, perhaps it would be to increase 124 by something else, but it would be better to know if it is really this line the problem before digging more)

Regards,

Solène

---

<div class="post-metadata">

**Author:** ![amsuhail](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/amsuhail/32/738_2.png) [@amsuhail](https://forum.croco-ocean.org/u/amsuhail)\
**Post date:** [September 18, 2025, 8:20am UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/8 "2025-09-18T08:20:31Z")

</div>

Hi,

That worked. It’s running now.

Thank You

Regards,  
Suhail

---

<div class="post-metadata">

**Author:** ![slegac](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/slegac/32/267_2.png) [@slegac](https://forum.croco-ocean.org/u/slegac)\
**Post date:** [September 18, 2025, 8:33am UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/9 "2025-09-18T08:33:33Z")

</div>

Great news ! 👍

Thanks for the update.  
I will open an issue to treat that in the code for the next release.

Regards

---

<div class="post-metadata">

**Author:** ![lcbernardo](https://forum.croco-ocean.org/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lcbernardo](https://forum.croco-ocean.org/u/lcbernardo)\
**Post date:** [November 18, 2025, 2:01am UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/10 "2025-11-18T02:01:56Z")

</div>

Hi!

Recently I had been working on a configuration that considers both river inputs and activation of the PISCES module. May I ask if the fix that you suggested also works for CROCO version 1.3.1?

In addition, I have some confusion about the use of DIURNAL\_INPUT\_SRFLUX. Similar to @amsuhail, I am using hourly shortwave radiation data in my bulk forcing. However, it is based on a different data set than ERA or other of the more commonly used datasets. So if I were to create the ‘radswbio’ variable necessary for DIURNAL\_INPUT\_SRFLUX, what should it consist of? Is it something like a daily or monthly average of the hourly data I am using?

I would greatly appreciate any guidance on this matter.

Thanks,  
Lawrence

---

<div class="post-metadata">

**Author:** ![jvmcgovern](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/jvmcgovern/32/668_2.png) [@jvmcgovern](https://forum.croco-ocean.org/u/jvmcgovern)\
**Post date:** [January 26, 2026, 11:57am UTC](https://forum.croco-ocean.org/t/utility-of-diurnal-input-srflx-option-in-pisces/231/11 "2026-01-26T11:57:00Z")

</div>

My interpretation of this flag is that it is needed to ensure that shortwave radiation is non zero outside of daylight hours.

I’m using ERA5 hourly data which naturally follows the diurnal cycle. However, shortwave radiation outside of daylight hours is an arbitrary 1e-15 value. Does this negage the need for the DIURNAL\_INPUT\_SRFLUX flag and the need for the inputting of swradbio?
