Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How can I run a simulation of multiple years in the GIPL-ECSimpleSnow notebook? #201

Open
iovereem opened this issue Jan 20, 2023 · 2 comments

Comments

@iovereem
Copy link

hi Mark,

I am running the GIPL-ECsimplesnow notebooks from the pymt example notebooks.
It runs well with the defaults.

I also manage to manipulate the snow_model.cfg file (after doing the setup step, I manually change the *.cfg file).
Then I run the initialize step with the saved, manipulated snow_model.cfg file.
This is a bit bothersome, but fine to set up a simulation with different snow or temperature input.

However, if I try to make the simulation longer, for example 2 years.
I do this by manipulating the gipl_config.cfg file.
It reads the 2 years all right in the initialize step.
(I know this from the cell that reports the space dimensions of temp matrix: Final soil temperatures will be (176, 730))

Then I try to run the execute loop for 730 iterations.
Unfortunately, that code cell fails, the kernel crashes?

@mdpiper
Copy link
Member

mdpiper commented Jan 20, 2023

You can set model parameters using the setup method (see Model setup in the docs)--it's much easier than editing the configuration file! Each model parameter name is mapped to a keyword in setup. For example, in the notebook you're using, this call to setup

ec.setup(".", snowpack__initial_depth=5.0)

would change ECSimpleSnow's initial snowpack depth to 5 cm from a default of 0 cm. The modified parameter value is written to the configuration file.

The setup method can be used to programmatically set the parameters of any pymt-wrapped model.

@mdpiper
Copy link
Member

mdpiper commented Jan 20, 2023

For the run duration problem you're seeing in the notebook, this isn't a pymt problem. Maybe break it down into smaller pieces? For example, can GIPL and ECSimpleSnow run independently for the expected duration?

@mdpiper mdpiper removed their assignment Jan 20, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants