ARPA-SIMC / libsim

Command-line utilities and fortran modules for meteorological data processing
GNU General Public License v2.0
7 stars 1 forks source link

vg6d_getpoint unrotation impossible for cosmo-2I_er open data #88

Closed abigmo closed 2 years ago

abigmo commented 2 years ago

Dear ARPA-SIMC,

I am running into this error when interpolating a cosmo-2I_er grid by ARPAE to extract the data in a point around Modena.

A note: I am using the precompiled bin from smnd, version 2.11 on an ubuntu 20.04 desktop 64bit Another note: it works just fine with cosmo-5M_er

$ bash smnd-2.11/unibin/vg6d_getpoint --lon=10.9202 --lat=44.6568 --trans-type=inter --sub-type=near --output-format=native cosmo-2I_er.202111080000.grib blabla.grib

 [dummy] INFO        vg6d_getpoint.grid_class - gridinfo_import, 2566 messages/bands imported from file cosmo_arpae/downloads/cosmo-2I_er.202111080000.grib
 [dummy] INFO        vg6d_getpoint.volgrid6d_class.input volume - 3 different grid definition(s) found in input data
 [dummy] WARN        vg6d_getpoint.grid_class - gaid exist: grib duplicated
 [dummy] WARN        vg6d_getpoint.grid_class - gaid exist: grib duplicated
 [dummy] INFO         - deleting gridinfo
 [dummy] INFO         - unrotating vector components
 [_default] INFO         - package file smnd-2.11//share/libsim/vargrib2bufr.csv found
 [_default] INFO         - package file smnd-2.11//share/libsim/vargrib2bufr.csv opened
 [_default] INFO         - package file smnd-2.11//share/libsim/vargrib2bufr.csv found
 [_default] INFO         - package file smnd-2.11//share/libsim/vargrib2bufr.csv opened

...

 [_default] INFO         - Found 599 variables in dballe master table
 [dummy] INFO         - unrotating vector components
 [_default] WARN         - variable B11200 present but the corresponding y-component B11201 is missing, (un)rotation impossible
 [dummy] ERROR        - unrotation impossible

Apparently the V-component of momentum flux is missing (only the U-component of momentum flux is present), i.e. I guess there is an error in the grib (IMHO). Since there is no contact for the dataset, I asked here...

Thx, AB

dcesari commented 2 years ago

It turned out that the component of momentum fluxes are defined on a staggered grid (i.e. shifted by a half grid step), so they are not associated one with the other. A quick fix is to filter out the momentum fluxes, e.g. with the following grib_api/eccodes comand:

grib_copy -w shortName!=uflx/vflx/aumfl_s/avmfl_s cosmo-2I_er.202111150000.grib nomomflux.grib

After that the command you showed works. If you really need the momentum flux there is a command for destaggering the staggered fields:

vg6d_transform --trans-type=none --a-grid cosmo-2I_er.202111150000.grib cosmo-2I_er.202111150000_destag.grib

but in this specific case it does not work, probably because this is a cut grid and the staggered fields have a different number of points. You can contact me directly, just search for my name in arpae.