PISCES blow-up during high freshwater input conditions

Hi everyone,

I have been trying to run a sub-regional ROMS+PISCES simulation using CROCO version 1.3.1 for an area which contains various features such as straits, small islands, and embayment areas. I have been experimenting with high-resolution river forcing (sub-daily intervals) and have been experiencing PISCES blowups (NaN values appear and the simulation stops) during periods of jointly occurring heavy rainfall and spikes in river flow rates. The cause of the blowup always seems to occur within an embayment at the point adjacent to a river input grid cell, and particularly affects the variables TALK, DIC, BFE, CACO3, DFE, and FER. Has anyone experienced something similar before? I would greatly appreciate any help or suggestions on how to possibly resolve this.

Also, for continuity with my previous setups, I have been continuing to use CROCO v1.3.1. Perhaps someone knowledgeable about the changes in v2.0.0 could also comment on whether upgrading to the latest version might potentially solve this issue?

Thanks,
Lawrence

Hi,
lcbernardo
It’s my pleasure to meet you on CROCO forum.
How is your health now. I hope you are fine now.
ln_river is working now with CROCOv2. ? please test it, after that we will discuss all of this. thank you.
Have a good day!
BEST
subhadeep

Hi Icbernado,

I’ve encountered a similar issue before.

The blow-up problem arises from a series of empirical formulas used to calculate certain variables, particularly in determining chemical coefficients. These formulas often involve the use of logarithmic (log()) functions.

When there’s a significant freshwater input, it’s possible that the calculated salinity can result in small negative values (e.g., -1e-10), which are invalid for logarithmic calculations.

To resolve this, I modified the code by adding a control for each log() calculation, ensuring that the relevant variables are greater than zero.

Hope this helps.
Xing

Hi Xing,

Thank you so much for the reply! I think this is exactly the help I needed to point me in the right direction. I had indeed been noticing very small negative salinity values in some of my outputs but wasn’t able to realize what this meant in the calculation of other parameters.

I’ll try to search the code for possible calculation errors involving log() functions and salinity. I had been wondering if this issue has been resolved in CROCO v2.0 as I am still using v1.3.1 but haven’t really had the time to make the shift. And so I’ll try to work with the code I have and see what changes I can make.

Anyway, thanks again, this is indeed very helpful.

Lawrence

Hi Lawrence and Xing,

Thanks for your insight into this issue. I have been experiencing the same problem in a high-resolution grid with both PISCES and PSOURCE enabled. I am posting here the solution that has worked for me to get rid of negative salinities, in case it is useful:

In p4zche.F90 (lines 166-176 in v2.0.0, modify to add MAX function calls like this):

DO jk = KRANGE
DO jj = JRANGE
DO ji = IRANGE
IF (neos == -1) THEN
salinprac(ji,jj,jk) = MAX(tsn(ji,jj,K,jp_sal) * 35.0 / 35.16504, 0.12)
ELSE
salinprac(ji,jj,jk) = MAX(tsn(ji,jj,K,jp_sal), 0.12)
ENDIF
END DO
END DO
END DO

where 0.12 is the salinity in my river inputs. The model runs fine with this.

Thanks,
Diego

1 Like

Hi Diego,

Thank you for kindly sharing the solution that worked for you. I am still using v1.3.1, but the code modification that worked for me is quite similar, although I didn’t use the MAX function. This looks somewhat smoother though, and so I will also try your approach. It’s indeed quite useful, so thank you again for replying to this post.

Best,
Lawrence

1 Like

@lcbernardo

Hi,
new PISCES code have GSI. Have you calculate it before (SB_rivers_3riv.nc)
i don’t find any GSI_src there in netcdf file. so analytical.F not find it .

Thanks
subhadeep

Hi @smaishal,

I have not yet started using the new PISCES code so I have not been able to include GSI yet. Perhaps I will try once I’ve been able to start using the newer code, but as of now I am quite busy with other tasks.

Thanks also,
Lawrence

1 Like