Several attributes issues
https://gitlab.eopf.copernicus.eu/S3/OLCI/s3olci/-/snippets/11
- Remove all "undefined" for attrs short_name and standard_name wrongly added by zarr_to_template even when not present in IPF:
sed -i '/\"undefined\"/d' file.jinja - Remove extra "," before "}" (because of 3.):
sed -i ':a;$!N;s/,\(\n[[:space:]]*\)*\n\([[:space:]]*}\)/\1\n\2/;ta;P;D' file.jinja - It seems zarr_to_template wrongly (?) replaces the "dtype" values by other representations but preferable to stick to CPM values:
sed -i -E 's/("dtype"\s*:\s*)"int8"/\1"<i1"/g; s/("dtype"\s*:\s*)"int16"/\1"<i2"/g; s/("dtype"\s*:\s*)"int32"/\1"<i4"/g; s/("dtype"\s*:\s*)"uint8"/\1"<u1"/g; s/("dtype"\s*:\s*)"uint16"/\1"<u2"/g; s/("dtype"\s*:\s*)"uint32"/\1"<u4"/g; s/("dtype"\s*:\s*)"float16"/\1"<f2"/g; s/("dtype"\s*:\s*)"float32"/\1"<f4"/g; s/("dtype"\s*:\s*)"float64"/\1"<f8"/g' file.jinja