Page 1 of 1

Bug report: GMAO_FP ancillary data, inconsistent pressure units

Posted: Thu Apr 06, 2023 9:48 am
by sakvaka_env
Bug report

Surface pressure is in millibars/hectopascals for previous NASA ancillary data sets, but in GMAO GEOS-5 FP-IT ancillary data files, the pressure unit is in pascals (1 mbar = 1 hPa = 100 Pa). Polymer v.4.16 doesn't do the conversion to millibars while it loads GMAO_FP ancillary data, which leads to 100-fold too high atmospheric pressures and then gives index overflow in the LUT table lookup.

Re: Bug report: GMAO_FP ancillary data, inconsistent pressure units

Posted: Thu Apr 06, 2023 10:10 am
by sakvaka_env
Patch to fix it.

Code: Select all

--- ancillary.original  2023-04-06 12:56:14.614553779 +0300
+++ ancillary.py        2023-04-06 12:56:47.183812874 +0300
@@ -214,6 +214,8 @@

         elif param == 'surf_press':
             press = ds['PS'].values
+            if 'units' in ds['PS'].attrs.keys() and ds['PS'].units == 'Pa':
+                press /= 100.
             D = LUT_LatLon(press[::-1,:])
             D.filename = {'meteo': orig_filename}

Re: Bug report: GMAO_FP ancillary data, inconsistent pressure units

Posted: Fri Apr 07, 2023 11:43 am
by fsteinmetz
Hi Sakari,
Many thanks for your bug report and for the patch, this is great!
I will provide your fix as an update.
Cheers, François