fimex:usage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
fimex:usage [2022-05-31 09:29:32]
external edit
fimex:usage [2022-11-15 14:13:54] (current)
alexanderb change wording
Line 1: Line 1:
-====== Usage Example ======+====== Usage Examples ======
  
 ===== Converting a felt model output from felt to NetCDF ===== ===== Converting a felt model output from felt to NetCDF =====
Line 9: Line 9:
   - adjust the projection and area you want to extract in fimex_example.cfg (or use command line arguments to fimex)   - adjust the projection and area you want to extract in fimex_example.cfg (or use command line arguments to fimex)
   - run <code>fimex -c fimex_example.cfg</code>   - run <code>fimex -c fimex_example.cfg</code>
 +
 +===== Writing zarr with libnetcdf =====
 +
 +Zarr does not support unlimited dimensions. You may need to set ''unlimited=false'' for some dimensions, e.g. with ncml like
 +  <?xml version="1.0" encoding="UTF-8"?>
 +  <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"
 +          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 +    <dimension name="time" length="61" isUnlimited="false" />
 +  </netcdf>
 +
 +In version 4.8.1, libnetcdf does not support compressed zarr chunks. You probably have to disable compression with a netcdf writer config xml file similar to:
 +  <?xml version="1.0" encoding="UTF-8"?>
 +  <cdm_ncwriter_config>
 +    <default compressionLevel="0" />
 +  </cdm_ncwriter_config>
 +
 +The fimex command would then be something like
 +  fimex \
 +      --input.file "input.nc" \
 +      --input.config "no_unlimited_dim.ncml" \
 +      --output.file "file:///path/to/output#mode=nczarr,file" \
 +      --output.config "nc_writer_no_compression.xml" \
 +      --output.type nc4
 +
 +Please note that using libnetcdf to write zarr will still use a lock on libnetcdf function calls, i.e. there will only be one thread at a time reading or writing.
 +
 +Datasets that were written like this do not seem to be readable with the same url (observed with netcdf 4.8.1), but reading appears to work with ''mode=zarr,file'' (i.e., not ''nczarr'').
 +
 +See the [[https://docs.unidata.ucar.edu/nug/current/nczarr_head.html|libnetcdf zarr documentation]] for more details on zarr support in libnetcdf.
  
  • fimex/usage.1653989372.txt.gz
  • Last modified: 2022-05-31 09:29:32
  • by