Note
Please report issues with this page on the GitHub page.
supy.save_supy¶
-
supy.
save_supy
(df_output: pandas.core.frame.DataFrame, df_state_final: pandas.core.frame.DataFrame, freq_s: int = 3600, site: str = '', path_dir_save: str = PosixPath('.'), path_runcontrol: str = None) → list[source]¶ Save SuPy run results to files
Parameters: - df_output (pandas.DataFrame) – DataFrame of output
- df_state_final (pandas.DataFrame) – DataFrame of final model states
- freq_s (int, optional) – Output frequency in seconds (the default is 3600, which indicates hourly output)
- site (str, optional) – Site identifier (the default is ‘’, which indicates site identifier will be left empty)
- path_dir_save (str, optional) – Path to directory to saving the files (the default is Path(‘.’), which indicates the current working directory)
- path_runcontrol (str, optional) – Path to SUEWS RunControl.nml, which, if set, will be preferably used to derive
freq_s
,site
andpath_dir_save
. (the default is None, which is unset)
Returns: a list of paths of saved files
Return type: Examples
- save results of a supy run to the current working directory with default settings
>>> list_path_save = supy.save_supy(df_output, df_state_final)
- save results according to settings in RunControl.nml
>>> list_path_save = supy.save_supy(df_output, df_state_final, path_runcontrol='path/to/RunControl.nml')
- save results of a supy run at resampling frequency of 1800 s (i.e., half-hourly results) under the site code
Test
to a customised location ‘path/to/some/dir’
>>> list_path_save = supy.save_supy(df_output, df_state_final, freq_s=1800, site='Test', path_dir_save='path/to/some/dir')