You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The workaround that @wk1984 identified (reinstatiating the model) is a good one, and not onerous on the user. If you want to run a model multiple times, it seems OK to create a new instance each time.
The issue occurs when we loop the model multiple times.
we have to initialize the model at the beginning of each loop:
ec.initialize('snow_model.cfg' )
then, we'd like to change a parameter in each loop:
ec.set_value('open_area_or_not', 1)
it will crash.
Currently, the alternative solution is to reload the module at the most beginning of each loop:
for example:
ec = pymt.models.ECSimpleSnow()
ec.initialize('snow_model.cfg' )
ec.set_value('open_area_or_not', 1)
It works.
Please find my example Jupyter notebook below.
Untitled.ipynb.zip
To check whether there are some problems in the Fortran source code, I also checked the BMIs in Fortran code. It works.
bmi_main_check.txt
So, this issue is confusing to me, @mdpiper.
The text was updated successfully, but these errors were encountered: