UMEP-dev / SUEWS

Surface Urban Energy and Water Balance Scheme
https://suews.readthedocs.io/
Mozilla Public License 2.0
12 stars 8 forks source link

Issue running old SUEWS simulations with new version - parameter missing? #237

Closed megstretton closed 10 months ago

megstretton commented 11 months ago

I am trying to run older SUEWS simulations with a newer version. When I try to run these as I previously did, I get the error:

Traceback (most recent call last):
  File "/home/users/mg002204/SUEWS/src/supy/supy/_run.py", line 380, in run_supy_ser
    list_res_grid = [
  File "/home/users/mg002204/SUEWS/src/supy/supy/_run.py", line 381, in <listcomp>
    suews_cal_tstep_multi(dict_state_input, df_forcing)
  File "/home/users/mg002204/SUEWS/src/supy/supy/_run.py", line 140, in suews_cal_tstep_multi
    dict_input = {k: dict_input[k] for k in list_var_input_multitsteps}
  File "/home/users/mg002204/SUEWS/src/supy/supy/_run.py", line 140, in <dictcomp>
    dict_input = {k: dict_input[k] for k in list_var_input_multitsteps}
KeyError: 'faimethod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/users/mg002204/SUEWS_SS_simulations/run_SUEWS_script.py", line 19, in <module>
    df_output, df_state_final = sp.run_supy(df_forcing, df_state_init)
  File "/home/users/mg002204/SUEWS/src/supy/supy/_supy_module.py", line 372, in run_supy
    df_output, df_state_final = run_supy_ser(
  File "/home/users/mg002204/SUEWS/src/supy/supy/_run.py", line 388, in run_supy_ser
    raise RuntimeError(
RuntimeError:
====================
SUEWS kernel error!
A zip file for debugging has been saved as....

I have attached the zip file for debugging here. supy_debug-671e9066.zip

sunt05 commented 10 months ago

Hi @megstretton, please use the following code to fix your df_state_init for now; a more proper fix will be shipped via the supy code in a future release:

df_state_init_fixed = df_state_init.copy()
df_state_init_fixed[("faimethod", "0")] = 0