crop_mhm_setup#

Crop an existing mHM setup or setup file to a target domain.

The module crops NetCDF inputs by mask or coordinate bounds, recreates the input folder structure, rewrites ESRI headers where needed, copies unsupported files, and can create a matching latlon file for the cropped setup.

Authors#

  • Simon Lüdke

Classes#

LatlonFiles()

Files needed for latlon creation.

Functions#

call_create_latlon(dem_output_file, ...[, ...])

Create lat/lon headers for multiple resolutions and write the latlon file.

crop_file(input_file, mask_ds, latslice, ...)

Crops one file by lat and lon slice and may mask it with the mask dataarray.

crop_file_with_header(ds_in, file_path, ...)

Crop the nc file and create a new header file for the new coordinates.

crop_mhm_setup(mask_ds, output_path, input_path)

Cut out an existing mhm domain setup using a mask file.

regrid_mask(mask_ds, lon_key_mask, ...[, ...])

Regrid a xarray mask dataset mask_ds to the resolution of a second dataset ds2.