Division by zero problems with global grid that includes poles
Posted: September 12th, 2025, 11:36 am
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
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