Division by zero problems with global grid that includes poles

Post any defects you find in the HYSPLIT software here. The HYSPLIT Developers carefully monitor this list and will work diligently to repair any reported problems. When posting a bug report, please specify both the HYSPLIT version and operating system you are using.
Post Reply
mneish
Posts: 7
Joined: November 1st, 2024, 12:34 pm
Registered HYSPLIT User: No

Division by zero problems with global grid that includes poles

Post 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
mneish
Posts: 7
Joined: November 1st, 2024, 12:34 pm
Registered HYSPLIT User: No

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

Post 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.
Post Reply

Return to “Bugs”