Tip
Need help? Please let us know in the SUEWS Community.
Please report issues with the manual on GitHub Issues (or use Report Issue for This Page for page-specific feedback).
Please cite SUEWS with proper information from our Zenodo page.
6.2.1.4. supy.load_forcing_grid#
- supy.load_forcing_grid(path_init: str, grid: int, check_input=False, force_reload=True, df_state_init: DataFrame = None, config=None) DataFrame[source]#
Load forcing data for a specific grid included in the index of
df_state_init.Deprecated since version 2025.11.20: This function is deprecated and will be removed in a future release. Please migrate to
SUEWSSimulation.update_forcingorread_forcingutilities.- Parameters:
path_runcontrol (str) – Path to SUEWS RunControl.nml
grid (int) – Grid number
check_input (bool, optional) – flag for checking validity of input: df_forcing: forcing data and df_state_init: model initial states. If set to
True, any detected invalid input will stop SuPy simulation; aFalseflag 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_forcing – Forcing data. See df_forcing variables for details.
- Return type:
See also
supy.suews_sim.SUEWSSimulation.update_forcingModern interface for loading forcing data (recommended)
Examples
>>> path_runcontrol = ( ... "~/SUEWS_sims/RunControl.nml" # a valid path to `RunControl.nml` ... ) >>> df_state_init = supy.init_supy(path_runcontrol) # get `df_state_init` >>> grid = df_state_init.index[ ... 0 ... ] # first grid number included in `df_state_init` >>> df_forcing = supy.load_forcing_grid( ... path_runcontrol, grid ... ) # get df_forcing