Grid#

class mhm_tools.pre.create_mhm_restart_file.Grid(file_path: Path, name=None, latlon_file=None, l0: LatLon = None, l1: LatLon = None, land_mask_file=None)[source]#

Bases: object

Represents a geographical area for wich morphological data exists.

This grid is used to run the mPR model. It does not need to contain a whole catchment, but can be a subset of it or multiple catchments at once.

Variables:
  • (Path) (file_path)

  • (str) (latlon_file)

  • (str)

  • (LatLon) (l1)

  • (LatLon)

Methods

migrate_grid_using_systemlink(new_path)

Mirgrates the file path by creating a new path and system linking all files there.

read_latlon(latlon_file)

Longitude and Latidute reader.

read_morph_files()

Read the morph files from the specified path.

Mirgrates the file path by creating a new path and system linking all files there.

read_latlon(latlon_file: Path)[source]#

Longitude and Latidute reader.

Read the latlon file and sets the lower-left (l0) and upper-right (l1) corners of the grid as well as the resolution.

Parameters:

latlon_file (Path) – Path to the latlon NetCDF file.

Return type:

None

read_morph_files()[source]#

Read the morph files from the specified path.

This method uses the read_files function from the MorphFiles object to read the morph files located at the specified path.

Parameters:

self – The instance of the class.

Return type:

None