From 33c2de6aecf217839af53cc7c0e43e9187d70068 Mon Sep 17 00:00:00 2001 From: Anne Fouilloux Date: Thu, 2 Nov 2023 15:22:56 +0100 Subject: [PATCH 1/6] draft netcdf2zarr tool --- tools/netcdf2zarr/.shed.yml | 10 + tools/netcdf2zarr/README.md | 5 + tools/netcdf2zarr/test-data/output.nc | Bin 0 -> 1252 bytes .../netcdf2zarr/test-data/output.zarr/.zattrs | 9 + .../netcdf2zarr/test-data/output.zarr/.zgroup | 3 + .../test-data/output.zarr/.zmetadata | 163 ++++ .../test-data/output.zarr/latitude/.zarray | 20 + .../test-data/output.zarr/latitude/.zattrs | 7 + .../test-data/output.zarr/latitude/0 | Bin 0 -> 20 bytes .../test-data/output.zarr/level/.zarray | 20 + .../test-data/output.zarr/level/.zattrs | 7 + .../netcdf2zarr/test-data/output.zarr/level/0 | Bin 0 -> 20 bytes .../test-data/output.zarr/longitude/.zarray | 20 + .../test-data/output.zarr/longitude/.zattrs | 7 + .../test-data/output.zarr/longitude/0 | Bin 0 -> 24 bytes .../test-data/output.zarr/no2_conc/.zarray | 26 + .../test-data/output.zarr/no2_conc/.zattrs | 12 + .../test-data/output.zarr/no2_conc/0.0.0.0 | Bin 0 -> 24 bytes .../test-data/output.zarr/time/.zarray | 20 + .../test-data/output.zarr/time/.zattrs | 7 + .../netcdf2zarr/test-data/output.zarr/time/0 | Bin 0 -> 20 bytes tools/netcdf2zarr/test-data/timeseries.nc | Bin 0 -> 12432 bytes .../test-data/timeseries.zarr/.zattrs | 1 + .../test-data/timeseries.zarr/.zgroup | 3 + .../test-data/timeseries.zarr/.zmetadata | 837 ++++++++++++++++++ .../timeseries.zarr/CLEAR_SKY_BHI/.zarray | 26 + .../timeseries.zarr/CLEAR_SKY_BHI/.zattrs | 10 + .../timeseries.zarr/CLEAR_SKY_BHI/0.0.0.0 | Bin 0 -> 384 bytes .../timeseries.zarr/CLEAR_SKY_BNI/.zarray | 26 + .../timeseries.zarr/CLEAR_SKY_BNI/.zattrs | 10 + .../timeseries.zarr/CLEAR_SKY_BNI/0.0.0.0 | Bin 0 -> 369 bytes .../timeseries.zarr/CLEAR_SKY_DHI/.zarray | 26 + .../timeseries.zarr/CLEAR_SKY_DHI/.zattrs | 10 + .../timeseries.zarr/CLEAR_SKY_DHI/0.0.0.0 | Bin 0 -> 374 bytes .../timeseries.zarr/CLEAR_SKY_GHI/.zarray | 26 + .../timeseries.zarr/CLEAR_SKY_GHI/.zattrs | 10 + .../timeseries.zarr/CLEAR_SKY_GHI/0.0.0.0 | Bin 0 -> 376 bytes .../test-data/timeseries.zarr/G0/.zarray | 26 + .../test-data/timeseries.zarr/G0/.zattrs | 10 + .../test-data/timeseries.zarr/G0/0.0.0.0 | Bin 0 -> 367 bytes .../timeseries.zarr/altitude/.zarray | 20 + .../timeseries.zarr/altitude/.zattrs | 7 + .../test-data/timeseries.zarr/altitude/0 | Bin 0 -> 24 bytes .../timeseries.zarr/latitude/.zarray | 20 + .../timeseries.zarr/latitude/.zattrs | 7 + .../test-data/timeseries.zarr/latitude/0 | Bin 0 -> 24 bytes .../timeseries.zarr/longitude/.zarray | 20 + .../timeseries.zarr/longitude/.zattrs | 7 + .../test-data/timeseries.zarr/longitude/0 | Bin 0 -> 24 bytes .../test-data/timeseries.zarr/rely/.zarray | 26 + .../test-data/timeseries.zarr/rely/.zattrs | 8 + .../test-data/timeseries.zarr/rely/0.0.0.0 | Bin 0 -> 77 bytes .../test-data/timeseries.zarr/time/.zarray | 20 + .../test-data/timeseries.zarr/time/.zattrs | 9 + .../test-data/timeseries.zarr/time/0 | Bin 0 -> 242 bytes .../test-data/timeseries.zarr/tst_day/.zarray | 26 + .../test-data/timeseries.zarr/tst_day/.zattrs | 10 + .../test-data/timeseries.zarr/tst_day/0.0.0.0 | Bin 0 -> 112 bytes .../timeseries.zarr/tst_hour/.zarray | 26 + .../timeseries.zarr/tst_hour/.zattrs | 10 + .../timeseries.zarr/tst_hour/0.0.0.0 | Bin 0 -> 112 bytes .../test-data/timeseries.zarr/tst_jd/.zarray | 26 + .../test-data/timeseries.zarr/tst_jd/.zattrs | 10 + .../test-data/timeseries.zarr/tst_jd/0.0.0.0 | Bin 0 -> 441 bytes .../timeseries.zarr/tst_minute/.zarray | 26 + .../timeseries.zarr/tst_minute/.zattrs | 10 + .../timeseries.zarr/tst_minute/0.0.0.0 | Bin 0 -> 112 bytes .../timeseries.zarr/tst_month/.zarray | 26 + .../timeseries.zarr/tst_month/.zattrs | 10 + .../timeseries.zarr/tst_month/0.0.0.0 | Bin 0 -> 112 bytes .../timeseries.zarr/tst_second/.zarray | 26 + .../timeseries.zarr/tst_second/.zattrs | 10 + .../timeseries.zarr/tst_second/0.0.0.0 | Bin 0 -> 449 bytes .../timeseries.zarr/tst_year/.zarray | 26 + .../timeseries.zarr/tst_year/.zattrs | 10 + .../timeseries.zarr/tst_year/0.0.0.0 | Bin 0 -> 40 bytes .../test-data/timeseries.zarr/ut_day/.zarray | 26 + .../test-data/timeseries.zarr/ut_day/.zattrs | 10 + .../test-data/timeseries.zarr/ut_day/0.0.0.0 | Bin 0 -> 112 bytes .../test-data/timeseries.zarr/ut_hour/.zarray | 26 + .../test-data/timeseries.zarr/ut_hour/.zattrs | 10 + .../test-data/timeseries.zarr/ut_hour/0.0.0.0 | Bin 0 -> 112 bytes .../test-data/timeseries.zarr/ut_jd/.zarray | 26 + .../test-data/timeseries.zarr/ut_jd/.zattrs | 10 + .../test-data/timeseries.zarr/ut_jd/0.0.0.0 | Bin 0 -> 166 bytes .../timeseries.zarr/ut_minute/.zarray | 26 + .../timeseries.zarr/ut_minute/.zattrs | 10 + .../timeseries.zarr/ut_minute/0.0.0.0 | Bin 0 -> 112 bytes .../timeseries.zarr/ut_month/.zarray | 26 + .../timeseries.zarr/ut_month/.zattrs | 10 + .../timeseries.zarr/ut_month/0.0.0.0 | Bin 0 -> 112 bytes .../timeseries.zarr/ut_second/.zarray | 26 + .../timeseries.zarr/ut_second/.zattrs | 10 + .../timeseries.zarr/ut_second/0.0.0.0 | Bin 0 -> 37 bytes .../test-data/timeseries.zarr/ut_year/.zarray | 26 + .../test-data/timeseries.zarr/ut_year/.zattrs | 10 + .../test-data/timeseries.zarr/ut_year/0.0.0.0 | Bin 0 -> 40 bytes tools/netcdf2zarr/xarray_netcdf2zarr.py | 19 + tools/netcdf2zarr/xarray_netcdf2zarr.xml | 43 + 99 files changed, 2067 insertions(+) create mode 100644 tools/netcdf2zarr/.shed.yml create mode 100644 tools/netcdf2zarr/README.md create mode 100644 tools/netcdf2zarr/test-data/output.nc create mode 100644 tools/netcdf2zarr/test-data/output.zarr/.zattrs create mode 100644 tools/netcdf2zarr/test-data/output.zarr/.zgroup create mode 100644 tools/netcdf2zarr/test-data/output.zarr/.zmetadata create mode 100644 tools/netcdf2zarr/test-data/output.zarr/latitude/.zarray create mode 100644 tools/netcdf2zarr/test-data/output.zarr/latitude/.zattrs create mode 100644 tools/netcdf2zarr/test-data/output.zarr/latitude/0 create mode 100644 tools/netcdf2zarr/test-data/output.zarr/level/.zarray create mode 100644 tools/netcdf2zarr/test-data/output.zarr/level/.zattrs create mode 100644 tools/netcdf2zarr/test-data/output.zarr/level/0 create mode 100644 tools/netcdf2zarr/test-data/output.zarr/longitude/.zarray create mode 100644 tools/netcdf2zarr/test-data/output.zarr/longitude/.zattrs create mode 100644 tools/netcdf2zarr/test-data/output.zarr/longitude/0 create mode 100644 tools/netcdf2zarr/test-data/output.zarr/no2_conc/.zarray create mode 100644 tools/netcdf2zarr/test-data/output.zarr/no2_conc/.zattrs create mode 100644 tools/netcdf2zarr/test-data/output.zarr/no2_conc/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/output.zarr/time/.zarray create mode 100644 tools/netcdf2zarr/test-data/output.zarr/time/.zattrs create mode 100644 tools/netcdf2zarr/test-data/output.zarr/time/0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.nc create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/.zgroup create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/.zmetadata create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_BHI/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_BHI/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_BHI/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_BNI/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_BNI/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_BNI/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_DHI/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_DHI/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_DHI/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_GHI/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_GHI/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/CLEAR_SKY_GHI/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/G0/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/G0/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/G0/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/altitude/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/altitude/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/altitude/0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/latitude/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/latitude/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/latitude/0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/longitude/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/longitude/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/longitude/0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/rely/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/rely/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/rely/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/time/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/time/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/time/0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_jd/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_jd/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_jd/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_minute/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_minute/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_minute/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_month/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_month/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_month/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_second/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_second/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_second/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_year/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_year/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/tst_year/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_day/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_day/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_day/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_hour/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_hour/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_hour/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_jd/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_jd/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_jd/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_minute/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_minute/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_minute/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_second/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_second/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_second/0.0.0.0 create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_year/.zarray create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_year/.zattrs create mode 100644 tools/netcdf2zarr/test-data/timeseries.zarr/ut_year/0.0.0.0 create mode 100755 tools/netcdf2zarr/xarray_netcdf2zarr.py create mode 100644 tools/netcdf2zarr/xarray_netcdf2zarr.xml diff --git a/tools/netcdf2zarr/.shed.yml b/tools/netcdf2zarr/.shed.yml new file mode 100644 index 0000000..47c8758 --- /dev/null +++ b/tools/netcdf2zarr/.shed.yml @@ -0,0 +1,10 @@ +categories: +- Climate Analysis +description: netCDF to Zarr conversion +homepage_url: https://docs.xarray.dev/en/latest/generated/xarray.Dataset.to_zarr.html +long_description: | + This tool is a wrapper for converting netCDF data into Zarr. +name: netcdf2zarr +owner: climate +remote_repository_url: https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/netcdf2zarr +type: unrestricted diff --git a/tools/netcdf2zarr/README.md b/tools/netcdf2zarr/README.md new file mode 100644 index 0000000..461b6fa --- /dev/null +++ b/tools/netcdf2zarr/README.md @@ -0,0 +1,5 @@ + +# netCDF to Zarr conversion + +This tool allows you to generate NC Zarr from a netCDF file. + diff --git a/tools/netcdf2zarr/test-data/output.nc b/tools/netcdf2zarr/test-data/output.nc new file mode 100644 index 0000000000000000000000000000000000000000..2e06aa941f357d61d164ee991edb07323cd2b8d8 GIT binary patch literal 1252 zcmaJ>ON$dh5T0me6ZZk$6h!EgxVW>)M%aV5**sWb6ITO*hzy;XPNtWh?%3V4n4>>K z|A(GMJa|y>;K74G#;VRtk{w|iimC2;d|y>pPq#Oyd7g)|4N?cWC6t_TnF`<^& zl#y|+r!+2NcDOVMYPph#gFNo{sHJ4CRg%XnA(I6eGRqVhXe!INEu(T>Y%u1oi-K5X zK79ke4U=aXUFV%#MJ6dw6pMBJYD%y>v4Se3)zEAuD@`G;f+`jPzaMUZoBmaty%I+% zZBs}D3$b9n>%UO1%&+4H=c^hjb#3}rv1%Cv!YcFs2EBX_Si?<_>*}~y&K1E&boH7c z^uHeZI6Os9OUysu*OaOg;RJz>?-+5hp3Qqh|LthNg?LFt&S1CXUHi89f_lTuS literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/output.zarr/level/.zarray b/tools/netcdf2zarr/test-data/output.zarr/level/.zarray new file mode 100644 index 0000000..3b86cec --- /dev/null +++ b/tools/netcdf2zarr/test-data/output.zarr/level/.zarray @@ -0,0 +1,20 @@ +{ + "chunks": [ + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": "UcHBTv)NOi?j52#N}b@(>kajWEFIJP-yIz&89*iB{T1sdL#37^lFwTJL|V*tuo5a;oiKTkDq&1P2c(d*n6$D z_pCj8lMap;;-Yc3Mie*t^3WPAdP{zWj=smwJPg`j)eQ}1Q@ooh~oUWX`o@v#vC?$L+?(6`e}{Ip#dQML$(Xhu50& zq*&}3Kz9{$u+sOxcYbgT51WUln1@cAXQA6YWDeq_|7H@AbhiiR@I389d>%M{S3WkZ zeZGD2bm?YOMxKK;OUj6$8_2|{3mlPB(RwZPhBZ}Uq9cHHYo$CbDiRN&~S`@bbehUv<29%_WYX;&o}6` zCMiNomsVl|Ho@nJZku}1|G3lf3Upew$Z%c!tK+%xoobKgo|qts{?M0AqiK$DJm@$^ zvxzOix{Om_?1VmQT`wMVEb(KUA410}r#7HtWjIdhmyKYUe)aZ2g?hB$Y6Q@#aXKD5>4{55!B$J)o$2-=&O zW8R=+U`*#_!-lNem=Emudt>s;k#)@1V#_#MHL&FUy!h*Kj1OD;%^qC)3Gr<4^YOef zo(IO`i?uG}J#6iJ&@sf~=WD+m#%YLg#6qQYUB>#O_1_TVJq(|m=CPyI*s|jezmUyHs%8t0$-OMO6i#OhGOJ8u9Gp@Pa1o(-G1{u88Iw3SDT?{ zw;;)EqTey}hD5)MwFW82pf%A)4hy?iSrO&c0D%sFmd&Q1M4m~Zr81HB_j@skUrp$79rI!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xQcx!6wZC;Acn3Pmoq z6Z?sNM886ji|xdIq94((P~>7ev7hKi^eYs(*iP&x`VsvKMJ~1z`-y%;ze16V?Zkef zAJMN+?isW{R%}cwiEk_et5tC0HF)@x&QzG literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/.zattrs b/tools/netcdf2zarr/test-data/timeseries.zarr/.zattrs new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/.zattrs @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/.zgroup b/tools/netcdf2zarr/test-data/timeseries.zarr/.zgroup new file mode 100644 index 0000000..3b7daf2 --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/.zgroup @@ -0,0 +1,3 @@ +{ + "zarr_format": 2 +} \ No newline at end of file diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/.zmetadata b/tools/netcdf2zarr/test-data/timeseries.zarr/.zmetadata new file mode 100644 index 0000000..1b2e128 --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/.zmetadata @@ -0,0 +1,837 @@ +{ + "metadata": { + ".zattrs": {}, + ".zgroup": { + "zarr_format": 2 + }, + "CLEAR_SKY_BHI/.zarray": { + "chunks": [ + 96, + 1, + 1, + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": "!MofFVJ_VL`)z1q=>A`a#2j2MGxb z4Gs-k(&?JNHJITK&Ep+2&W*`8>YKh?l%O6!2tWsLksz zjvG8@6++i(Udw7!njd@EMKZsX|U;q4z792y=G6%!kukeHa1lnewZAdsA# zl$a178yy)Q8XOeh=k4L<>|kqQVxXxaC&tJ8?b)SGB^^NX=Gy~-0|>A(Xfn7md|goX1wib;(BROJz@WguaNxm# z1q}-l4m2bvENEb8P+(|iXgHvt!0@2qzypSa1O{RgH}8j zGn3D$@N4f@`K3KJ3}J2i)qCSDN9c5p#6yBWM>3=^F#NZ=QW^J7w>P&kPIUGs0WtRL zZ5n%=_v=sl>@npgyPScIldF@Jt~ASwoQdmhFezEMc;skg{J1#7_d_FN@%1G3<$W9G zzAM={`?|>L1O}E*f+9K=jvjtNp%Kxs@rg;v$tkI+X=&-{=@}UrnIOQ*@Lwb&BRwrO zH6=MIF(E!SIw~?EEHor2z|Y&=#nIN>NJ~+eVOJajQ#}KN0|>A(7zo(=GAsZ&7yu+d%Vs@{I`LucI zyjq?KLLTdvUjM|AcfmPC*1vSgnMqU6*jcDdXtv&#z`*q1#v)bx9`{u&taZrhl$+H?nB@u`zGOx#h7byuEipH5d;a<=E`r_#$W zn%_=V%`92}@_?q|F44B>%-biPpQ7;Y_UF}#TR;4s5HdfWf$_gB!I0hlCWn9H51sw>@%wAs5CiWp3Mpt9nAteGdiVqcg@i>!#l$5fCM74Qq^6~%r)Okj zWP$*YPESuuO-)HoN=%54jgAZt4G#48_Hc2uH8<8(l@(%s@g{+RN#EXqk-_8xgS{;< HWDx)WV~3Vl literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/G0/.zarray b/tools/netcdf2zarr/test-data/timeseries.zarr/G0/.zarray new file mode 100644 index 0000000..94ec72a --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/G0/.zarray @@ -0,0 +1,26 @@ +{ + "chunks": [ + 96, + 1, + 1, + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": "zAN!NGxH!Gi}64m2nEqf`h|?goK0z z2@EBSjQ?#8f9|!>d>-m6@-ygV1*`k}WzzWp3yfNit2rewF#Wf&{t%<3TX;8zC;ztp zamStFevRv{d}QV0{(X0Sk?OIK3o>qLH62}zxd9q)%ijhrekx|+6Xav9@b}WfEW=lY zKU+jMtP@`poKW%6XAaQ3k7A691{Mx39=?IWp%GEB@rg;vDXD20nORxcIk|ax`S}GP zz{>DnBtJhdFE=MAJ1a9IJuM|UDKQ~7IwCA2(9g@&(aK1be<}k*5-=Pc7#Yk&>|+=L JfC0lJJ literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/latitude/.zarray b/tools/netcdf2zarr/test-data/timeseries.zarr/latitude/.zarray new file mode 100644 index 0000000..02d121f --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/latitude/.zarray @@ -0,0 +1,20 @@ +{ + "chunks": [ + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": "3 literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/rely/.zarray b/tools/netcdf2zarr/test-data/timeseries.zarr/rely/.zarray new file mode 100644 index 0000000..94ec72a --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/rely/.zarray @@ -0,0 +1,26 @@ +{ + "chunks": [ + 96, + 1, + 1, + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": "EM|lGDBv8$_kwgCOd2nxSa605OO2tLCTAq z4<$cp7+N@b1g1#LQCOm}#$b!Z9)}|yX9BK7+(~$n@uuKQ#h(U3`ln2vJ#W#{m1{O^ z-o9(!!J{Y6oWFeS*4>9sUc7$)>D$l0j4T}7{6b=qvI;8d+ImK&mNpK~?p}U@p%F3h z$!S@+g{2iW_04Tvy%VR*m_2{dvXyH$Y}vkh-=U)?&s?~C{noulr$B&}fnEMIBZIDd M0waTaKmrH=01|z0j{pDw literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/.zarray b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/.zarray new file mode 100644 index 0000000..56cf8cc --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/.zarray @@ -0,0 +1,26 @@ +{ + "chunks": [ + 96, + 1, + 1, + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": "|i1", + "fill_value": null, + "filters": null, + "order": "C", + "shape": [ + 96, + 1, + 1, + 1 + ], + "zarr_format": 2 +} \ No newline at end of file diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/.zattrs b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/.zattrs new file mode 100644 index 0000000..bd5bf17 --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/.zattrs @@ -0,0 +1,10 @@ +{ + "_ARRAY_DIMENSIONS": [ + "time", + "altitude", + "latitude", + "longitude" + ], + "comments": "TST day", + "units": "day" +} \ No newline at end of file diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/0.0.0.0 b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_day/0.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..efb0bf4573a8a9b339efb3d6c21c22a8b48474c7 GIT binary patch literal 112 ZcmZQ#G-ga-U|;~@0w5NoB@hx40szRH2g?8e literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/.zarray b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/.zarray new file mode 100644 index 0000000..56cf8cc --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/.zarray @@ -0,0 +1,26 @@ +{ + "chunks": [ + 96, + 1, + 1, + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": "|i1", + "fill_value": null, + "filters": null, + "order": "C", + "shape": [ + 96, + 1, + 1, + 1 + ], + "zarr_format": 2 +} \ No newline at end of file diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/.zattrs b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/.zattrs new file mode 100644 index 0000000..719858d --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/.zattrs @@ -0,0 +1,10 @@ +{ + "_ARRAY_DIMENSIONS": [ + "time", + "altitude", + "latitude", + "longitude" + ], + "comments": "TST hours", + "units": "h" +} \ No newline at end of file diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/0.0.0.0 b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_hour/0.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..13e7d96b3627aa7cab3a706d0dcc3d1c59537ab6 GIT binary patch literal 112 zcmWm6#|?lm0KmW`^xk0*7GebUe{r1TuT#9^6GHfV6(Wg@oPv^ynueB+o`I2xnT3^& Jor9AL`wuCd1-JkJ literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/tst_jd/.zarray b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_jd/.zarray new file mode 100644 index 0000000..94ec72a --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_jd/.zarray @@ -0,0 +1,26 @@ +{ + "chunks": [ + 96, + 1, + 1, + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": "0y*P$L zOO_sIj=hw?c6f4mZei2>BkvW0TDCr9Q#Q5K7k;wH}D~QlUMG){(1RZld1#kzEf^1W~~2i*LqeYX2~0qnj^en^PU@2 z9_9(1|I(=Dm_XE$cNR@&#S>S5b?CYxm$B)$YyS@EM?`)?>_Zu;fabxAUD#Rv1c zqddVgAE@PS{^`(mMkr$56RiTR`m11cMXUabCIr=8(FCE(5TsFe8H8#f=#oY)2&qF* z%_VgZx(GpPH5Wms8i+1HkZSb>S2uT0FK=Hz|G=Q&(6I2xsOZ?Z_{5~-)U@=>tnA#p z{KBH*(z5c(s_NRh`o^Z_*0%P}uI}Ex{)v+&Pn|Y>=B(Ls=gnWZXz|iz%U7;iy>{LD rjhi-a-L`$_uHAe0?LTgaPFMl{GXdFns+V($Mf` zf}qede{q9h}O!62bxg~yH!3==#~XjsfJcyZtYL&AX%1_~1% zBrH$>nfZWyVW9F6GqsPsEMe+b)`r)sPLR!0n;~M$sj7L{%FwIz%-M5AF+Z4dvwoYH ziJfTjmk{yZnp$*W>S_({(BA@Qv?cbopLD$#c5qKz^?tF;Gl#Za{_vRP?~?DFwand} zIZj(&eY-c;aL(=5m%2qumaJ$p*v#)7V8yt?VBQDa;LL*TC|7O4UoY-CEM!hSsXOU= z+%f%`ECu&`_v$Ya?`5fZ_vGHK8#nJfdinVux0IH(U*aoa+w_UMpYj-Q_-0nBLlxB17Cmx2mk>5Yq4km literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/tst_year/.zarray b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_year/.zarray new file mode 100644 index 0000000..b2c17a4 --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/tst_year/.zarray @@ -0,0 +1,26 @@ +{ + "chunks": [ + 96, + 1, + 1, + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": ")1@f}04@{>*Z=?k literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/.zarray b/tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/.zarray new file mode 100644 index 0000000..56cf8cc --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/.zarray @@ -0,0 +1,26 @@ +{ + "chunks": [ + 96, + 1, + 1, + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": "|i1", + "fill_value": null, + "filters": null, + "order": "C", + "shape": [ + 96, + 1, + 1, + 1 + ], + "zarr_format": 2 +} \ No newline at end of file diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/.zattrs b/tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/.zattrs new file mode 100644 index 0000000..a63c2f7 --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/.zattrs @@ -0,0 +1,10 @@ +{ + "_ARRAY_DIMENSIONS": [ + "time", + "altitude", + "latitude", + "longitude" + ], + "comments": "UT month", + "units": "month" +} \ No newline at end of file diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/0.0.0.0 b/tools/netcdf2zarr/test-data/timeseries.zarr/ut_month/0.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..aaff3648c2954b41e03db6afbd9b8ad2c5529ed0 GIT binary patch literal 112 WcmZQ#G-ga-U|;~@0w89iF#rGng#)Mn literal 0 HcmV?d00001 diff --git a/tools/netcdf2zarr/test-data/timeseries.zarr/ut_second/.zarray b/tools/netcdf2zarr/test-data/timeseries.zarr/ut_second/.zarray new file mode 100644 index 0000000..94ec72a --- /dev/null +++ b/tools/netcdf2zarr/test-data/timeseries.zarr/ut_second/.zarray @@ -0,0 +1,26 @@ +{ + "chunks": [ + 96, + 1, + 1, + 1 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dtype": " + Rewrite a netCDF to Zarr + + python + zarr + xarray + netcdf4 + dask + cftime + + + + + + + + + + + + + + + + + topic_3318 + + + operation_0335 + + From 4f7581de630fddb984a4e22b74a199c810dc5fcb Mon Sep 17 00:00:00 2001 From: Anne Fouilloux Date: Thu, 2 Nov 2023 15:37:44 +0100 Subject: [PATCH 2/6] try to add test --- tools/netcdf2zarr/xarray_netcdf2zarr.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/netcdf2zarr/xarray_netcdf2zarr.xml b/tools/netcdf2zarr/xarray_netcdf2zarr.xml index 2f91876..767d4d0 100644 --- a/tools/netcdf2zarr/xarray_netcdf2zarr.xml +++ b/tools/netcdf2zarr/xarray_netcdf2zarr.xml @@ -22,6 +22,12 @@ + + + + + + Date: Thu, 2 Nov 2023 15:53:50 +0100 Subject: [PATCH 3/6] Update xarray_netcdf2zarr.xml --- tools/netcdf2zarr/xarray_netcdf2zarr.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/netcdf2zarr/xarray_netcdf2zarr.xml b/tools/netcdf2zarr/xarray_netcdf2zarr.xml index 767d4d0..1eca25d 100644 --- a/tools/netcdf2zarr/xarray_netcdf2zarr.xml +++ b/tools/netcdf2zarr/xarray_netcdf2zarr.xml @@ -11,23 +11,23 @@ - + - - + + - - + + Date: Thu, 2 Nov 2023 15:55:24 +0100 Subject: [PATCH 4/6] test against EU which has the new datatype --- .github/workflows/pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 0ae4e97..8665054 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -16,8 +16,8 @@ on: - 'docs/**' - '*' env: - GALAXY_FORK: galaxyproject - GALAXY_BRANCH: release_23.1 + GALAXY_FORK: usegalaxy-eu + GALAXY_BRANCH: release_23.1_europe GALAXY_COPERNICUS_CDSAPIRC_KEY: ${{ secrets.GALAXY_COPERNICUS_CDSAPIRC_KEY }} COPERNICUS_CDSAPIRC_KEY_FILE: ${{ secrets.COPERNICUS_CDSAPIRC_KEY_FILE }} MAX_CHUNKS: 4 From 01612a7ddb922dc5f2760aca298f5218a035c196 Mon Sep 17 00:00:00 2001 From: Anne Fouilloux Date: Thu, 2 Nov 2023 16:18:46 +0100 Subject: [PATCH 5/6] try to comply with planemo lint --- tools/netcdf2zarr/xarray_netcdf2zarr.py | 3 --- tools/netcdf2zarr/xarray_netcdf2zarr.xml | 26 ++++++++++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/tools/netcdf2zarr/xarray_netcdf2zarr.py b/tools/netcdf2zarr/xarray_netcdf2zarr.py index 7f399e4..66b6737 100755 --- a/tools/netcdf2zarr/xarray_netcdf2zarr.py +++ b/tools/netcdf2zarr/xarray_netcdf2zarr.py @@ -1,12 +1,9 @@ import argparse -import ast -import warnings import cftime # noqa: F401 import xarray as xr # noqa: I202,E402 -import zarr # noqa: I202,E402 parser = argparse.ArgumentParser() parser.add_argument("-i", "--input", type=str, help="input file in netCDF format") diff --git a/tools/netcdf2zarr/xarray_netcdf2zarr.xml b/tools/netcdf2zarr/xarray_netcdf2zarr.xml index 1eca25d..5d4bb28 100644 --- a/tools/netcdf2zarr/xarray_netcdf2zarr.xml +++ b/tools/netcdf2zarr/xarray_netcdf2zarr.xml @@ -1,5 +1,11 @@ Rewrite a netCDF to Zarr + + topic_3318 + + + operation_0335 + python zarr @@ -39,11 +45,19 @@ This tool is a wrapper to convert a netCDF data to Zarr using xarray. ]]> + + + @article{hoyer2017xarray, + title = {xarray: {N-D} labeled arrays and datasets in {Python}}, + author = {Hoyer, S. and J. Hamman}, + journal = {Journal of Open Research Software}, + volume = {5}, + number = {1}, + year = {2017}, + publisher = {Ubiquity Press}, + doi = {10.5334/jors.148}, + url = {http://doi.org/10.5334/jors.148} + } + - - topic_3318 - - - operation_0335 - From fae786688a28c638733e7e7211d058ce819e645d Mon Sep 17 00:00:00 2001 From: Anne Fouilloux Date: Thu, 2 Nov 2023 17:01:25 +0100 Subject: [PATCH 6/6] update tests for zarr --- tools/netcdf2zarr/test-data/output.dat | 0 tools/netcdf2zarr/test-data/timeseries.dat | 0 tools/netcdf2zarr/xarray_netcdf2zarr.xml | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 tools/netcdf2zarr/test-data/output.dat create mode 100644 tools/netcdf2zarr/test-data/timeseries.dat diff --git a/tools/netcdf2zarr/test-data/output.dat b/tools/netcdf2zarr/test-data/output.dat new file mode 100644 index 0000000..e69de29 diff --git a/tools/netcdf2zarr/test-data/timeseries.dat b/tools/netcdf2zarr/test-data/timeseries.dat new file mode 100644 index 0000000..e69de29 diff --git a/tools/netcdf2zarr/xarray_netcdf2zarr.xml b/tools/netcdf2zarr/xarray_netcdf2zarr.xml index 5d4bb28..7d3230a 100644 --- a/tools/netcdf2zarr/xarray_netcdf2zarr.xml +++ b/tools/netcdf2zarr/xarray_netcdf2zarr.xml @@ -29,11 +29,11 @@ - + - +