pygetm.input.util package
Submodules
Module contents
- pygetm.input.util.configure_chunking_and_compression(ds: Dataset, complevel: int | None = None) None[source]
Configure chunking and compression for all DataArrays in a Dataset. This is done by manipulating the encoding attribute of each DataArray in-place. This attribute controls how the data will be written to a NetCDF file. Data variables are compressed if complevel is non-zero, otherwise decompressed. Compressed variables have chunk size 1 along the time dimension, and chunk sizes equal to the full dimension size along other dimensions. Coordinate variables are never compressed.
- Parameters:
ds – Dataset to configure
complevel – Compression level (0-9) for data variables, or None to use the original compression level (if any). If 0, no compression is applied.