Page 1 of 1

Division by zero problems with global grid that includes poles

Posted: September 12th, 2025, 11:36 am
by mneish
Version: 5.4.2

This may be very specific to my setup, but I'm encountering some numerical issues when using a global grid where the +90/-90 latitudes are included. Specifically, I'm using ERA5 data that was converted using the default configuration of the "hysplit_metdata" utility.

For instance, in stltmass.f, UMF can become ill-defined at the pole when GX is 0.

Similarly, in stltdsp.f, UBAR can become ill-defined when GDISX is 0.

I was able to work around this issues by checking for zero in those X dimensions, and arbitrarily set UMF and UBAR to zero in that case. Maybe there's a better approach?

Thanks,
Mike

Re: Division by zero problems with global grid that includes poles

Posted: September 23rd, 2025, 2:12 pm
by mneish
Found a third location where this is happening. In advsti.f, when gspdx = 0 at the poles, then the calculation of UU becomes ill defined.