Commit 7c832934 authored by Clément Haëck's avatar Clément Haëck
Browse files

Apply metadata setup to save_chunks_by_date

parent 87e6735f
......@@ -25,5 +25,6 @@ clouds = clouds.rename(CHL='cloud_probability')
clouds = clouds.chunk({'time': 1})
odir = lib.data.clouds_maps.get_root(args)
lib.setup_meta_attrs(clouds, args)
save_chunks_by_date(clouds, path.join(odir, '%Y/cloud_%Y%m.nc'),
encoding={'_all': {'zlib': True}})
......@@ -38,6 +38,7 @@ def main(args):
'_FillValue': -32767.,
'dtype': 'int16',
'scale_factor': 1e-3}}
lib.setup_meta_attrs(hi, args)
save_chunks_by_date(hi, filename=filename,
encoding=encoding)
......
......@@ -50,7 +50,7 @@ def main():
outdir = lib.data.front_probability.get_root(args, period='monthly')
lib.check_output_dir(path.join(outdir, str(args['year'])))
lib.setup_meta_attrs(mth, args)
save_chunks_by_date(mth, path.join(outdir, '%Y/%Y%m%d.nc'))
return mth
......
......@@ -25,6 +25,7 @@ def main(args):
lib.check_output_dir(path.join(finder.root, '{:d}'.format(args['year'])))
filename = finder.get_filename()
lib.setup_meta_attrs(ds, args)
save_chunks_by_date(ds, filename,
encoding={'_all': {'zlib': True}})
......
......@@ -56,6 +56,7 @@ def main(args):
zlib=True))
ofile = lo.get_filename(args, Y='%Y', m='%m', d='%d', relative=False)
lib.setup_meta_attrs(ds_out, args)
save_chunks_by_date(ds_out, ofile, encoding=encoding)
return ds_out
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment