-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify adding models #338
Comments
Another feature that would be very helpful for development purposes is enabling models without containers. We could make a distinction between a |
Different constructors. Currently our models are initialized with a version tag. While this is good for checking compatibility between model, forcing, and parameterset, it would also be very useful to be able to start a model directly from a container URI or image filename. One way to approach this is by having multiple constructors: ContainerizedModel.from_version(version="2020.10", ...)
# One option is separate constructors for docker/apptainer
ContainerizedModel.from_docker(docker_uri="ewatercycle/wflow-grpc4bmi:2020.10", ...)
ContainerizedModel.from_apptainer(sif_file="wflow_grpc4bmi_2020-10.sif")
# Or reconstruct from docker uri:
ContainerizedModel.from_image(image = "ewatercycle/wflow-grpc4bmi:2020.10")
# if config.container_engine == singularity: derive image filename from image |
Interesting to check out for forcing: https://nasaaccess.readthedocs.io/en/latest/index.html |
The public API consists out of
By moving to a plugin architecture the public API can be refactored.
|
All tasks have been completed. Models are much simpler to add now. |
Currently, adding a model to eWaterCycle is cumbersome:
Our current structure is as follows:
Alternatively, we could use something like
Then, all model-specific quirks are contained within one folder/module/repo. This would make it easier to add new models. It might also make sense to move all specific model implementations out of the main eWaterCycle package and support them as plugins instead. Such a structure would facilitate that:
This requires some work on the package architecture:
The text was updated successfully, but these errors were encountered: