pydropsonde.helper.xarray_helper

pydropsonde.helper.xarray_helper#

Functions

add_ancillary_var(ds, variable, anc_name)

add ancillary variable to xarray dataset variable

get_chunks(ds, var[, object_dim, alt_dim])

get standard chunks for one object_dim (like sonde_id or circle_id) and one height dimension

get_encoding(ds, filetype[, exclude_vars])

get encoding for a dataset depending on filetype

get_nc_encoding(ds, var, **kwargs)

get netcdf encoding for dataset default compression is zlib for compatibility

get_target_dtype(ds, var)

reduce float dtypes to float32 and properly encode time

get_zarr_encoding(ds, var, **kwargs)

get zarr encoding for dataset

open_dataset(path)

open an xr.dataset from path depending on filetype

to_file(ds, path, filetype[, overwrite])

write dataset to file depending on filetype.

write_ds(ds, dir, filename, **kwargs)

standardized way to write level files; includes determination of filetype and encoding