imod.msw.PrecipitationMapping#

class imod.msw.PrecipitationMapping(precipitation: DataArray)[source]#

This contains the data to connect precipitation grid cells to MetaSWAP svats. The precipitation grid does not have to be equal to the metaswap grid: connections between the precipitation cells to svats will be established using a nearest neighbour lookup.

This class is responsible for the file svat2precgrid.inp.

Parameters

precipitation (array of floats (xr.DataArray)) – Describes the precipitation data. The extend of the grid must be larger than the MetaSvap grid. The data must also be coarser than the MetaSvap grid.

__init__(precipitation: DataArray)[source]#

Methods

__init__(precipitation)

grid_mapping(svat, meteo_grid)

isel()

sel()

write(directory, index, svat)

Write MetaSWAP package to its corresponding fixed format file.

write_dataframe_fixed_width(file, dataframe)

Write dataframe to fixed format file.