Note
Please report issues with this page on the GitHub page.
supy.run_supy¶
-
supy.
run_supy
(df_forcing: pandas.core.frame.DataFrame, df_state_init: pandas.core.frame.DataFrame, save_state=False, n_yr=10) → Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame][source]¶ Perform supy simulation.
Parameters: - df_forcing (pandas.DataFrame) – forcing data for all grids in
df_state_init
. - df_state_init (pandas.DataFrame) – initial model states; or a collection of model states with multiple timestamps, whose last temporal record will be used as the initial model states.
- save_state (bool, optional) – flag for saving model states at each time step, which can be useful in diagnosing model runtime performance or performing a restart run. (the default is False, which instructs supy not to save runtime model states).
- n_yr (int, optional) – chunk size (
n_yr
years) to split simulation periods so memory usage can be reduced. (the default is 10, which implies 10-year forcing chunks used in simulations).
Returns: df_output, df_state_final –
- df_output: output results
- df_state_final: final model states
Return type: Tuple[pandas.DataFrame, pandas.DataFrame]
Examples
>>> df_output, df_state_final = supy.run_supy(df_forcing, df_state_init)
- df_forcing (pandas.DataFrame) – forcing data for all grids in