Project

General

Profile

HDF5 from LSA-SAF to Netcdf in lonlat for a part of central europe

Added by Luis Ramirez Camargo almost 7 years ago

Dear CDO support team and users,
I am trying to use the snow cover data (Euro coverage) of the lsa-saf for a project but have problems defining the grid with cdo for further processing. These data are provided in HDF5 format in the MSG-seviri geostationary projection but I require them in NETCDF in lonlat. when using "cdo griddes" with one of the HDF5 files this is the result:

gridtype = generic
gridsize = 1107351
xsize = 1701
ysize = 651

The transformation fron HDF5 to nc4 does work without errors (in both cases with -import_cmsaf and whitout it).
The problems start, however, when I try to perform further computations since cdo cannot operate with the "generic" grid type. The solution that I found in the Forums was to use -setgrid and a file defining the input grid.
following the documentation from the LSA-SAF I created the following file:

gridtype = lonlat
gridsize = 1107351
xsize = 1701
ysize = 651
xname = lon
xunits = "degrees"
yname = lat
yunits = "degrees"
xfirst = -46.0475
xlast = 78.338
yfirst = 81.2648
ylast = 34.4869

and with it the following line works without errors:
cdo -f nc4 copy -setgrid,seviri_grid_euro.txt HDF5_LSASAF_MSG_SnowC1U_Euro_201401311200 test_out.nc
After setting this grid I am able to make further operations with test_out.nc but the spatial coverage is unfortunatelly wrong (see attached image. the raster should actually match with the coastlines).
I suppose the error is that the original file is in a Geostationary projection and with my file I was unable to provide this information to cdo. It was impossible for me to find an example of how this file should actually looks like. I tried changing the gridtype but there were not many documented options (e.g. curviliniear, unstructured)and further calculations such as changing resolution and cliping with a bounding box ended with errors. I would highly appreaciate if someone could tell me which is the appropriate way to set the grid in this case and/or any hints in case someone has experience with the lsa-saf data and cdo.
thank you in advance!
Best Regards


Replies (1)

RE: HDF5 from LSA-SAF to Netcdf in lonlat for a part of central europe - Added by Ralf Mueller almost 7 years ago

Hi Luis!

IMO this is definitively not a lonlat grid. your four-line

gridtype = generic
gridsize = 1107351
xsize = 1701
ysize = 651
is just a place holder to be able to use parts of cdo. Everything related to locations cannot work. If you have better grid information, setgrid is the way to go, but the lonlat stuff is for sure incorrect (curvilinera might work). You have to have the correct grid information for your data, otherwise CDO will compute wrong stuff like cell areas and by that field mean values and so on. Sorry to disappoint you, but correct coordinates are needed

hth
ralf

    (1-1/1)