Tip
Need help? Please let us know in the UMEP Community.
Find an issue within this page? Please report it in the GitHub issues.
A good understanding of SUEWS is a prerequisite to the proper use of SuPy.
supy.init_supyΒΆ
- supy.init_supy(path_init: str, force_reload=True, check_input=False) pandas.core.frame.DataFrame [source]ΒΆ
Initialise supy by loading initial model states.
- Parameters
path_init (str) β
- Path to a file that can initialise SuPy, which can be either of the follows:
SUEWS RunControl.nml: a namelist file for SUEWS configurations
SuPy
df_state.csv
: a CSV file including model states produced by a SuPy run viasupy.save_supy()
force_reload (boolean, optional) β Flag to force reload all initialisation files by clearing all cached states, with default value
True
(i.e., force reload all files). Note: If the number of simulation grids is large (e.g., > 100),force_reload=False
is strongly recommended for better performance.check_input (boolean, optional) β flag for checking validity of input:
df_forcing
anddf_state_init
. If set toTrue
, any detected invalid input will stop SuPy simulation; aFalse
flag will bypass such validation and may incur kernel error if any invalid input. Note: such checking procedure may take some time if the input is large. (the default isFalse
, which bypasses the validation).
- Returns
df_state_init β Initial model states. See df_state variables for details.
- Return type
Examples
Use RunControl.nml to initialise SuPy
>>> path_init = "~/SUEWS_sims/RunControl.nml" >>> df_state_init = supy.init_supy(path_init)
Use
df_state.csv
to initialise SuPy
>>> path_init = "~/SuPy_res/df_state_test.csv" >>> df_state_init = supy.init_supy(path_init)