eWaterCycle / ewatercycle

Python package for running hydrological models
https://ewatercycle.readthedocs.io/en/latest/
Apache License 2.0
33 stars 5 forks source link

Some utilities for comparison notebooks #283

Open SarahAlidoost opened 2 years ago

SarahAlidoost commented 2 years ago

cc @Peter9192 and @sverhoeven: More path to ewatercycle system-related config file (grouped based on models):

Example usage would be: MODEL_OUTPUT_BASE_DIR = ewatercycle.config.CFG["model_output_base_dir"]["marrmot-m01"]

Generic util functions that can be used by most of the models:

Marrmot calibration module that can be used for three marrmot models:

lisflood specific that can be added to forcing module:

I didn't look at hype, pcrglob and wflow.

Peter9192 commented 2 years ago

As a scientist doing a comparison study using eWaterCycle, I'd like to have a nice location to store my DRS/paths, so I can easily find my files from within the notebooks.

We could make era5-comparison/utils/paths.py and do something like

from utils import paths
shapefile = paths.get_shapefile(catchment)

This would work for all paths that are specific to the comparison study but not generic enough for adding them to the main ewatercycle package. Can also be used for the work_dir and filenames

Peter9192 commented 2 years ago

As a writer of the comparison paper, I want to refactor marrmot calibration code into a separte python module so I can easily reuse it, and the notebooks will still look clean

Since the BMI interface makes it relatively easy to do calibration "outside" of the main model code using a wide variety of calibration routines, we don't want to add it to the ewatercycle package (yet). However, if we find that some functions can be generic enough and useful, we might still do that in a later stage.

For now, let's make comparison.utils.calibrate.marrmot

Peter9192 commented 2 years ago

As a user of lisflood, I want to have a lisvap specific module, so it doesn't distract too much from the main flow of the experiment in the notebook

Until we move lisvap to the ewatercycle.forcing module, we can make comparison.utils.lisvap

Peter9192 commented 2 years ago

For PCRGlob, there are a couple of functions that might be generalizable as well or could at least be refactored into utils:

image

Peter9192 commented 2 years ago

For wflow the following candidates for refactoring: