supy.init_supy

Contents

Tip

  1. Need help? Please let us know in the SUEWS Community.

  2. Please report issues with the manual on GitHub Issues (or use Report Issue for This Page for page-specific feedback).

  3. Please cite SUEWS with proper information from our Zenodo page.

6.2.1.1. supy.init_supy#

supy.init_supy(path_init: str, force_reload=True, check_input=False) DataFrame[source]#

Initialise supy by loading initial model states.

Deprecated since version 2025.11.20: This function is deprecated and will be removed in a future release. Please migrate to the object-oriented SUEWSSimulation interface (see supy.suews_sim.SUEWSSimulation).

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 via supy.save_supy()

  • force_reload (bool, 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 (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; a False 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 is False, which bypasses the validation).

Returns:

df_state_init – Initial model states. See df_state variables for details.

Return type:

pandas.DataFrame

See also

supy.suews_sim.SUEWSSimulation

Modern object-oriented interface (recommended)

Examples

  1. Use RunControl.nml to initialise SuPy

>>> path_init = "~/SUEWS_sims/RunControl.nml"
>>> df_state_init = supy.init_supy(path_init)
  1. Use df_state.csv to initialise SuPy

>>> path_init = "~/SuPy_res/df_state_test.csv"
>>> df_state_init = supy.init_supy(path_init)