Model
- class GEBModel(config, files, mode='w', timing=False)[source]
GEB parent class.
- Parameters:
config (
dict
) – Filepath of the YAML-configuration file (e.g. model.yml).files (
dict
) – Dictionary with the paths of the input files.mode (
str
) – Mode of the model. Either w (write) or r (read).timing (
bool
) – Boolean indicating if the model steps should be timed.
- property bounds
Property returning the bounds of the current model as tuple
- Returns:
tuple – xmin, xmax, ymin, ymax bounds of the model
- create_datetime(date)[source]
Create a datetime object from a date with time set to midnight.
- Parameters:
date (
date
) – Date object to convert to datetime.- Returns:
Datetime object with time set to midnight.
- Return type:
datetime
- property current_day_of_year: int
Gets the current day of the year.
- Returns:
day – current day of the year.
- property current_time_unix_s: int
Gets the current time in unix seconds.
- Returns:
time – current time in unix seconds.
- restore(store_location, timestep, n_timesteps)[source]
Restore the model state to the original state given by the function input.
- Parameters:
store_location (
str
|Path
) – Location of the store to restore the model state from.timestep (
int
) – timestep to restore the model state to.n_timesteps (
int
) – number of timesteps (i.e., the final timestep) to restore the model state to.
- Return type:
None
- run(initialize_only=False)[source]
Run the model for the entire period, and export water table in case of spinup scenario.
- Return type:
None
- property simulation_root: Path
Gets the simulation root.
- Returns:
simulation_root – Path of the simulation root.
- property simulation_root_spinup: Path
Gets the simulation root of the spinup.
- Returns:
simulation_root – Path of the simulation root.
- step()[source]
Forward the model by the given the number of steps.
- Parameters:
step_size – Number of steps the model should take. Can be integer or string day, week, month, year, decade or century.
- Return type:
None
- property xmax
Get model xmax
- Returns:
float – xmax
- property xmin
Get model xmin
- Returns:
float – xmin
- property ymax
Get model ymax
- Returns:
float – ymax
- property ymin
Get model ymin
- Returns:
float – ymin