imod.msw.MeteoGrid#

class imod.msw.MeteoGrid(precipitation: xarray.core.dataarray.DataArray, evapotranspiration: xarray.core.dataarray.DataArray)[source]#

This contains the meteorological grid data. Grids are written to ESRI ASCII files. The meteorological data requires a time coordinate. Next to a MeteoGrid instance, instances of PrecipitationMapping and EvapotranspirationMapping are required as well to specify meteorological information to MetaSWAP.

This class is responsible for mete_grid.inp.

Parameters
  • precipitation (array of floats (xr.DataArray)) – Contains the precipitation grids in mm/d. A time coordinate is required.

  • evapotranspiration (array of floats (xr.DataArray)) – Contains the evapotranspiration grids in mm/d. A time coordinate is required.

__init__(precipitation: xarray.core.dataarray.DataArray, evapotranspiration: xarray.core.dataarray.DataArray)[source]#

Methods

__init__(precipitation, evapotranspiration)

check_string_lengths(dataframe)

Check if strings lengths do not exceed 256 characters.

isel()

sel()

write(directory, *args)

Write mete_grid.inp and accompanying ASCII grid files.

write_dataframe_fixed_width(file, dataframe)

Write dataframe to fixed format file.

write_free_format_file(path, dataframe)

Write free format file.