mhm_tools.common#

Common routines and constants.

Subpackages#

constants

Common constants.

NetCDF#

set_netcdf_encoding(ds[, var_encoding])

Set default netcdf encoding settings to a xarray data-set.

generate_bounds(da[, bounds_dim])

Generate bounds for a given coordinate.

ESRI grids#

read_header(file)

Read an ASCII grid header from file.

read_grid(file[, dtype])

Read an ASCII grid from file.

write_header(file, header[, dtype])

Write an ascii header to file.

write_grid(file, header[, data, dtype])

Write an ascii grid to file.

standardize_header(header)

Standardize an ASCII grid header dictionary.

rescale_grid(header, cellsize[, in_name, ...])

Rescale grid from given header to a coarser cell-size with matching extend.

check_resolutions(cellsize_1, cellsize_2[, ...])

Check two resolutions for compatibility.

check_grid_compatibility(header_1, header_2)

Check grids for compatibility.

Constants#

NO_DATA

Default no data value for mHM.

NC_ENCODE_DEFAULTS

Default netcdf encoding settings.

ESRI_TYPES

types for ESRI ASCII grid header information.

ESRI_REQ

Required ESRI ASCII grid header information.