Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make generic distributed esmvaltool recipe * New API for forcing generator * Use fluent builder pattern to construct esmvaltool recipes * Added builder.add_variables(['pr']) * Working GenericDistributedForcing.generate * Move all esmvaltool specific stuff to own package This make base package much cleaner * Move builder test * Fix mypy errors * Use builder for LisfloodForcing * Dont use name of Python built-in package as module name Got Traceback (most recent call last): File "/home/verhoes/git/eWaterCycle/ewatercycle/src/ewatercycle/esmvaltool/diagnostic/copy.py", line 7, in <module> from esmvaltool.diag_scripts.shared import ( File "/home/verhoes/mambaforge/envs/ewatercycle/lib/python3.10/site-packages/esmvaltool/diag_scripts/shared/__init__.py", line 2, in <module> from . import io, iris_helpers, names, plot File "/home/verhoes/mambaforge/envs/ewatercycle/lib/python3.10/site-packages/esmvaltool/diag_scripts/shared/io.py", line 5, in <module> from pprint import pformat File "/home/verhoes/mambaforge/envs/ewatercycle/lib/python3.10/pprint.py", line 38, in <module> import dataclasses as _dataclasses File "/home/verhoes/mambaforge/envs/ewatercycle/lib/python3.10/dataclasses.py", line 3, in <module> import copy File "/home/verhoes/git/eWaterCycle/ewatercycle/src/ewatercycle/esmvaltool/diagnostic/copy.py", line 7, in <module> from esmvaltool.diag_scripts.shared import ( ImportError: cannot import name 'ProvenanceLogger' from partially initialized module 'esmvaltool.diag_scripts.shared' (most likely due to a circular import) (/home/verhoes/mambaforge/envs/ewatercycle/lib/python3.10/site-packages/esmvaltool/diag_scripts/shared/__init__.py) * Added GenericLumpedForcing, untested as dcache is curently down * Use recipe builder for MarrmotForcing * Use builder in WflowForcing * Use builder for ForcingHype * Make mip required in dataset * More docs * Make expected recipe string consistent * Parse esmvaltool recipe output when non netcdf files are produced + more docs + fix tests * Got LisfloodForcing.generate(lisvap=None) working Had to make Dataset.mip optional otherwise tdps var with mip=day throws esmvaltool error * Make MarrmotForcing.generate work * Fix tests for wflow and pcrglobwb * Add support for variable without temporal selection * give right dataset to lisvap * Correct expected orog var * Make mypy happy * Dont copy line number, >>> and ... from code blocks * More tests, flake8 fixes and docs * Tests for DefaultForcing + Remove discriminator from forcing classes As you now have to specify which class you want to use to load a forcing. * Replaced with tests/src/base/test_forcing.py * Remove discriminator from forcing classes from tests * Make flake8 happier * Model validator should return otherwise object is set to None * Add test for MarrmotForcing.to_xarray() * Add generic forcing to user guide + custom forcing instructions + prevent circular deps with generic forcings in entry points * More docs * Use Dataset object instead of dict in pre defined datasets * Tested GenericDistributedForcing with non-era dataset * Allow extra attributes in Dataset '*' in forcing files was caused by version attribute in Dataset being silently forgotten. By allowing extra attributes the generate file has version value instead of `*`. * Tested CMIP6 * Add dataset.version to expected recipes * Add changes to CHANGELOG + more docs + more todos * Fix tests with updated model names * Disable lisflood model tests as downloading parameter set too slow * Implement PR suggestions * Rename build_recipe() to build_<modelname>_recipe() * Centralize esmvaltool config for download * Rename esmvaltool.models to esmvaltool.schema When we talk about models we mean hydrological models. --------- Co-authored-by: Peter Kalverla <[email protected]>
- Loading branch information