rubem.configuration.input_raster_series.InputRasterSeries
- class InputRasterSeries(**data)[source]
-
Bases:
BaseModelRepresents a set of input data directories and their corresponding filenames prefixes for raster files from its series.
The directories are given with the series names (
etp,precipitation,ndvi,kp,landuse); the attributes of the same names hold the absolute directory-plus-prefix paths the model reads its series from.- Parameters:
-
etp – Path to the directory containing ETP (Evapotranspiration) data.
etp_filename_prefix – Prefix for the ETP (Evapotranspiration) data filenames.
precipitation – Path to the directory containing precipitation data.
precipitation_filename_prefix – Prefix for the precipitation data filenames.
ndvi – Path to the directory containing NDVI (Normalized Difference Vegetation Index) data.
ndvi_filename_prefix – Prefix for the NDVI (Normalized Difference Vegetation Index) data filenames.
kp – Path to the directory containing KP (Crop Coefficient) data.
kp_filename_prefix – Prefix for the KP (Crop Coefficient) data filenames.
landuse – Path to the directory containing land use data.
landuse_filename_prefix – Prefix for the land use data filenames.
validate_input – If
True, validates the directories and the content of their raster files. Defaults toTrue.required_steps –
(first, last)time steps the simulation reads. When given, the precipitation, ETP and Kp series must cover every step (blocking), the NDVI and land use series must cover the first step (blocking) and later gaps are reported (the run reuses the previous raster). Defaults toNone(no completeness check).reference_projection – Reference coordinate reference system (WKT), see
reference_crs(). When given, a GeoTIFF series member with another CRS is a blocking problem. Defaults toNone(no CRS check).
- Raises:
-
NotADirectoryError – If any of the input data directories does not exist.
ValueError – If any of the input data directories is empty, or a prefix is too long.
FileNotFoundError – If any of the input data directories does not contain files with the specified prefix.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Methods
Attributes
Absolute path of the ETP series (directory joined with the prefix).
Absolute path of the Kp series.
Absolute path of the land use series.
Absolute path of the NDVI series.
Absolute path of the precipitation series.
Non-blocking data problems found while validating the series.
etp_directoryetp_filename_prefixprecipitation_directoryprecipitation_filename_prefixndvi_directoryndvi_filename_prefixkp_directorykp_filename_prefixlanduse_directorylanduse_filename_prefixvalidate_inputrequired_stepsreference_projection- property etp: str
-
Absolute path of the ETP series (directory joined with the prefix).
- property kp: str
-
Absolute path of the Kp series.
- property landuse: str
-
Absolute path of the land use series.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_by_alias': True, 'validate_by_name': True}
-
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context, /)
-
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Return type:
-
None - Parameters:
-
self – The BaseModel instance.
context – The context.
- property ndvi: str
-
Absolute path of the NDVI series.
- property precipitation: str
-
Absolute path of the precipitation series.
- property problems: list[Problem]
-
Non-blocking data problems found while validating the series.