Closed EddyCMWF closed 1 year ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.44%. Comparing base (
134df11
) to head (cfa24b8
). Report is 130 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks Eddy! I'm not sure that "-v" is quite the best argument, since it's usually used to denote 'verbose', but it seems like the best option at the moment. I'll merge the pull request, and if you think of another option abbreviation you prefer, we can always change it!
This is required because netCDF encoding options (e.g. compression options) need to be added per variable and it is not always possible/simple/sensible to know what variables are in the grib file before converting to netCDF.
This change allows users to provide a common set of compression options which are applied to each data variable in the xr.dataset. Any encoding provided in the netcdf_kwargs_json overrides what is set via the global var_encoding_json.
The variable encoding is parsed using the -v or --var-encoding-json options, e.g.: cfgrib to_netcdf -v '{"dtype": "float", "scale_factor": 0.1}' -o $OUTFILE $INFILE