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.
Methods
__init__
(precipitation)clip_box
([time_min, time_max, x_min, x_max, ...])Clip a package by a bounding box (time, y, x).
from_imod5_data
(imod5_data)Construct a MetaSWAP PrecipitationMapping package from iMOD5 data in the CAP package, loaded with the
imod.formats.prj.open_projectfile_data()
function.Returns the default regrid methods for this package.
regrid_like
(target_grid, regrid_cache[, ...])Returns a deepcopy of this instance, as regridding this package is irrelevant: The meteo data is not on model grid and the mapping is determined upon writing.
write
(directory, index, svat, mf6_dis, mf6_well)Write MetaSWAP package to its corresponding fixed format file.
Attributes
auxiliary_data_fields
dataset