Open iovereem opened 1 year ago
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.
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?
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?