GralDispersionModel / GRAMM

Gramm calculation core
GNU General Public License v3.0
9 stars 7 forks source link

Overflow Error if using custom profile #23

Open mgangwisch opened 6 months ago

mgangwisch commented 6 months ago

Hi *,

I get an overflow error in CALCPR.cs in line 449 if I'm using a custom vertical profile. In the console, the output of RHO also seems a bit odd to me. RHO gets to 0 for high altitudes - therefore also Tpot exceeds the limits.

I traced the error back to TEMPINT.cs in line 1931. Is it possible that line 1931 is wrong compared to line 1927 considering moist_adiabatic?

All the best!

MarkusKuntner commented 6 months ago

This is difficult for me to assess now because it seems to be a remnant of GRAMM_SCI. We have not yet had a problem with our test calculations, but I will pass the problem on to the relevant people.

MarkusKuntner commented 6 months ago

Dear @mgangwisch I got the following answer:

"I suspect that there is something "thermodynamically" wrong with the initialization of the pressure and 
temperature profile in the uppermost layers. Possibly the pressure is approaching 0 (?) due to the interpolation.
Maybe the profile initialization is less mature (?).
I think a closer look on the custom profile data would also be important."

We (as users) are solely using the default initialization, and we do not encounter any problems as described by you. Best Markus