Closed emd01 closed 3 weeks ago
Please provide the following:
sp.show_version()
Thanks.
Hi @emd01, your last post is unreadable. Could you please provide additional information using the proper GitHub interface?
RunControl.nml
is missing.
Apologies, the runcontrol file should be included in the zipped file above now
Thanks - I had a quick look at the files upload but didn't spot any apparent issue. However, it is noted a relatively old supy is being used - please do the following:
dev
version: pip install supy==2023.7.3.dev0
df_state
as your input files are based on a previous version of SUEWS:
# p_runcontrol is the path to your `RunControl.nml`
df_state_init = sp.init_supy(p_runcontrol)
df_state_init[("faimethod", "0")] = 0
grid = df_state_init.index[0]
df_forcing = sp.load_forcing_grid(path_runcontrol, grid)
df_output, df_state_final = sp.run_supy(df_forcing, df_state_init)
Should further issues arise, please attach the complete error log in a plain text file or simply post it here – no worries about the length. Thank you.
This RunTime error is now coming up, I've tried it in both jupyter notebook and command terminal
2023-12-19 15:11:08,948 - SuPy - INFO - All cache cleared.
2023-12-19 15:11:24,803 - SuPy - INFO - All cache cleared.
2023-12-19 15:11:40,976 - SuPy - INFO - All cache cleared.
2023-12-19 15:11:56,321 - SuPy - INFO - ====================
2023-12-19 15:11:56,322 - SuPy - INFO - Simulation period:
2023-12-19 15:11:56,322 - SuPy - INFO - Start: 2018-06-09 23:05:00
2023-12-19 15:11:56,322 - SuPy - INFO - End: 2018-06-15 23:00:00
2023-12-19 15:11:56,323 - SuPy - INFO -
2023-12-19 15:11:56,323 - SuPy - INFO - No. of grids: 11097
2023-12-19 15:11:56,324 - SuPy - INFO - SuPy is running in serial mode
Traceback (most recent call last):
File "C:\Users\emili\anaconda3\Lib\site-packages\supy\_run.py", line 380, in run_supy_ser
list_res_grid = [
^
File "C:\Users\emili\anaconda3\Lib\site-packages\supy\_run.py", line 381, in <listcomp>
suews_cal_tstep_multi(dict_state_input, df_forcing)
File "C:\Users\emili\anaconda3\Lib\site-packages\supy\_run.py", line 140, in suews_cal_tstep_multi
dict_input = {k: dict_input[k] for k in list_var_input_multitsteps}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\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 "C:\Users\emili\Downloads\SuPy_document\myscript.py", line 13, in <module>
df_output, df_state_final = sp.run_supy(df_forcing, df_state_init)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\supy\_supy_module.py", line 372, in run_supy
df_output, df_state_final = run_supy_ser(
^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\supy\_run.py", line 388, in run_supy_ser
raise RuntimeError(
RuntimeError:
====================
SUEWS kernel error!
A zip file for debugging has been saved as `C:/Users/emili/supy_debug-9a6e5d05.zip`:Please report this issue with the above zip file to the developer at https://github.com/UMEP-dev/SuPy/issues/new?assignees=&labels=&template=issue-report.md.
====================
did you use this piece of code provided above?
# p_runcontrol is the path to your `RunControl.nml`
df_state_init = sp.init_supy(p_runcontrol)
df_state_init[("faimethod", "0")] = 0
Yes I did
please upload the zip file as indicated in your error message above for further debugging.
====================
SUEWS kernel error!
A zip file for debugging has been saved as `C:/Users/emili/supy_debug-9a6e5d05.zip`:Please report this issue with the above zip file to the developer at https://github.com/UMEP-dev/SuPy/issues/new?assignees=&labels=&template=issue-report.md.
====================
The zipped file seems to be too large to upload as its 108MB, is there any other way to get the folder to you?
The zipped file seems to be too large to upload as its 108MB, is there any other way to get the folder to you?
Please upload it here: https://www.dropbox.com/request/X9BJ5mYHjkFmYc81Enz9
Thank you, just uploaded it there!
Just checked the zip file uploaded - apparently the modification was not done properly.
After the modification, there should be a new column faimethod
in the modified df_state
- use this code to check it:
df_state_init.filter(like='faimethod')
If you're unable to see it, then this line of code likely wasn't run correctly.
BTW, here I upload my code (in .ipynb
file) and your input files in a zip, which should be working - please give it a go:
Thank you, strange when I use that code to check it there is a faimethod column, it's full of zeros but I think it's supposed to be?
Thank you, strange when I use that code to check it there is a faimethod column, it's full of zeros but I think it's supposed to be?
That's right.
Anyway, please make sure you are using the the modified df_state
in the simulation, which needs to include a column faimethod
as you noticed above.
I've ran your code and it runs with 10 grids, however when I increase it to 100 grids the kernel dies, the data I am attempting to test has 11,097 grids. Could it be just an issue with the amount of grids being used?
That implies some of your grids contain invalid values that may trigger runtime errors. You will need to carefully determine which grids are causing the issue and find out the invalid values.
Hopefully, my answer above addresses this issue, so I'll close it for now. Otherwise, feel free to re-open and provide more details to help resolve it.
Continuously getting a KeyError: 'Level var not found' when running the code:
see full error in the following doc: SuPy ValueError.docx
Also get an error when running in QGIS, debugging file is too big to attach