diff --git a/axiom/data/drs.json b/axiom/data/drs.json index 0abef04..98476e5 100644 --- a/axiom/data/drs.json +++ b/axiom/data/drs.json @@ -70,6 +70,7 @@ "6H": "6hr", "fx": "fx" }, + "output_format": "NETCDF4", "encoding": { "variables": { "dtype": "float32", diff --git a/axiom/drs/__init__.py b/axiom/drs/__init__.py index d6506b0..49ad4f8 100644 --- a/axiom/drs/__init__.py +++ b/axiom/drs/__init__.py @@ -464,10 +464,13 @@ def postprocess(_ds, *args, **kwargs): logger.info('Waiting for computations to finish.') progress(_ds) + # Get the output format from config + output_format = config.get('output_format', 'NETCDF4') + logger.debug(f'Writing {output_filepath}') write = _ds.to_netcdf( output_filepath, - format='NETCDF4', + format=output_format, encoding=encoding, unlimited_dims=['time'] )