rubem.configuration.model_configuration_file.ModelConfigurationFile
- class ModelConfigurationFile(**data)[source]
-
Bases:
_SectionThe legacy configuration file, section by section.
Field names are the lower-case section names; the JSON keys are the upper-case aliases (
SIM_TIME,DIRECTORIES, …). Both spellings are accepted on input and the upper-case one is written on output.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
Read a legacy JSON file, warning about duplicated keys (the last value wins).
Return a copy whose relative paths are anchored on
base_dir.The canonical legacy dictionary (upper-case sections, canonical keys).
Attributes
sim_timedirectoriesfilename_prefixesrasterstablesgridcalibrationinitial_soil_conditionsconstantsgenerate_fileraster_file_format- classmethod from_json(path)[source]
-
Read a legacy JSON file, warning about duplicated keys (the last value wins).
- Return type:
-
Self
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'frozen': True, 'serialize_by_alias': True, 'validate_by_alias': True, 'validate_by_name': True}
-
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].