iamsaswata / imdlib

Download and process binary IMD meteorological data in Python
https://imdlib.readthedocs.io
MIT License
30 stars 16 forks source link

Adding Climate and Forecasting (CF) metadata convention in to_netcdf #8

Closed pratiman-91 closed 3 years ago

pratiman-91 commented 4 years ago

New Feature to_netcdf must include the CF conventions. This will help to maintain the compatibility in other software.

https://unidata.github.io/python-training/workshop/XArray/xarray-and-cf/

Might be help at later stage.

iamsaswata commented 3 years ago

Thanks for this awesome much needed suggestion. Now IMDLIB conforms CF-1.7 conventions. It has been added to the library using e6ac4fd6f266dcce12cb6138079d9b8e3ceb3911.
This modification is added at https://github.com/iamsaswata/imdlib/blob/f346a8efe99864ae0e4aad83217ee8f45c2e5fc1/imdlib/core.py#L131-L177

IMDLIB now also support latest pyproj CRS conventions too. So, using rioxarray with IMDLIB is very consistent now.

Output of ncdum -h info on the generated netCDF is shown at IMDLIB doc.

Final CF checking is also done using pumatest and result is show here. cf_convention