Skip to content

Trying to run static mode without setup (or update) crashes the model #1313

@jacobcook1995

Description

@jacobcook1995

Describe the bug
If you follow the instructions given in the docs for running a model in static mode and take the approach that is supposed to skip the model setup (or update) process the simulation run crashes during initialisation

To Reproduce
Steps to reproduce the behavior:

  1. Set up a virtual_ecosystem example simulation
  2. Configure a model (e.g. soil) to be static
  3. Provide all variables in that models _vars_populated_by_init as input data
  4. Run the simulation
  5. See error, i.e. "ValueError: Variable dissolved_nitrate initialised by soil already initialised by ['data']."

Expected behavior
Setup (or update) is skipped

Additional context
The question here is really whether this is a bug in the static model that should be fixed, or just a documentation problem (which was my assumption with #1218). An alternative option to make a model static, is to delete all references from it from the config and instead just provide the outputs that it should generate. This gives us a way to skip the update and setup process, but not the setup process by itself

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions