Skip to content
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

Penman-Monteith forcing (and the struggles of ESMValTool) #397

Open
BSchilperoort opened this issue Mar 19, 2024 · 7 comments
Open

Penman-Monteith forcing (and the struggles of ESMValTool) #397

BSchilperoort opened this issue Mar 19, 2024 · 7 comments
Labels
forcing Issue related to forcing (generation, loading, etc.)

Comments

@BSchilperoort
Copy link
Contributor

In PR #393 I attempted to add a generic forcing that would provide users with the meteo data required for the Penman-Monteith equation. I.e., air temperature, net radiation, vapor pressure deficit, wind speed.

However, I encountered a few issues:

  • Debugging is impossible with esmvaltool/esmvalcore as it locks up the threads. Which makes fixing problems in the code take a very long time as emsvaltool is slow.
  • The CMIP data is limited in the different variables that are available
  • The CMORized ERA5 data variables do not align well with the CMIP6 variables
    • wind speed consists of two components instead of mean horizontal speed
    • radiation has the net long/short wave and downwards long/short wave, instead of the 4 up/down long/short components
    • the dewpoint temperature is on a different mip table than all other variables. Which causes it to have different time bounds. Even though in the original ERA5 data from the CDS all data is on the same coordinates. Also, what is the difference between Eday and day because this is impossible to find in ESMValTool documentation, CMOR documentation, CMIP documentation.

Due to the issues piling up, we decided to put this on halt and finish up the PR without PM.

Here is how far I got:
https://gist.github.com/BSchilperoort/254fb3c5a54155b72e08861f40cb0e14

Of course this is a frustrating experience for myself, but I think this also touches on a more general problem: ESMValTool is built for evaluating climate model output. We're trying to use it for hydrological model input. This will clash in many ways, especially with ERA5 not fitting in CMIP properly.

While I do think that there is no alternative for ESMValTool when trying to get climate model data forcing data, I think that it might be better to give up on ERA5 + ESMValTool as it makes things a lot more complicated than it needs to be.

@BSchilperoort
Copy link
Contributor Author

While I do think that there is no alternative for ESMValTool when trying to get climate model data forcing data, I think that it might be better to give up on ERA5 + ESMValTool as it makes things a lot more complicated than it needs to be.

For an "eWaterCycle v3.0" I would propose to make esmvalcore optional, and make it not load on import ewatercycle. A default forcing generator can instead use, e.g. ERA5.

In the future it might be possible to directly use xarray to get ecmwf data, see https://github.com/bopen/xarray-ecmwf. This could make for a much more lightweight default forcing generator.

@RolfHut
Copy link
Contributor

RolfHut commented Mar 19, 2024

good one to discuss in person Thursday, while I support stopping with trying to build a generic Penman-Monteith forcing, I do not support the notion of stopping with ESMValTool as integral part of eWaterCycle. Let's discuss in person and report back here on outcomes

@Peter9192
Copy link
Collaborator

Peter9192 commented Mar 23, 2024

I recognize many of your frustrations, and I could agree with making esmvalcore optional (but not abandoning it).

I think that it might be better to give up on ERA5 + ESMValTool as it makes things a lot more complicated than it needs to be.

Lot's of climate studies also include era5 as a reference. A properly cmorized version of era5 would be very welcome. Whether that should be our concern is up for debate.

@RolfHut
Copy link
Contributor

RolfHut commented Mar 25, 2024

I also recognize the struggles (didn't get a simple ERA5 CMIP comparison to run yesterday...)

I would like to postpone this choice after we know if big Horizon proposal just submitted gets accepted. If it does, we are building eWaterCycle on top of the DestinE Service Platform with it's own access to ESA data lake (which includes CMIP and ECMWF data). If we don't get that, we can continue this discussion on the V3 requirements

@BSchilperoort
Copy link
Contributor Author

To clarify: I did not want to advocate for abandoning esmvaltool, but mostly making it

  1. Not load in by default
  2. Not the main way of making ERA5 forcing (if at some point we have time to work on this)

A properly cmorized version of era5 would be very welcome. Whether that should be our concern is up for debate.

This would be a pretty major project, as one of the main things that are lacking now is the small overlap between the MIP table variables and the ERA5 CMORized variables.
To solve this, a lot of variables would have to be derived or calculated from the base ERA5 output. This would require a major time investment, as well as an enormous amount of storage if we'd want to have access to this data.

@Peter9192
Copy link
Collaborator

as well as an enormous amount of storage if we'd want to have access to this data

Note that ESMValTool supports on-the-fly cmorization. CMORizers can be added per-variable, see https://github.com/ESMValGroup/ESMValCore/blob/main/esmvalcore/cmor/_fixes/native6/era5.py and https://docs.esmvaltool.org/en/latest/input.html#datasets-in-native-format

@BSchilperoort
Copy link
Contributor Author

Additional issue encountered by Rolf here. ESMValTool uses the center of the time bounds (i.e. noon) for daily data.

This will conflict with other daily data loaded with e.g. pandas and xarray. It's also not really following the cf-conventions. According to those 2001-01-01 is interpreted as 2001-01-01T00:00:00.

@BSchilperoort BSchilperoort added the forcing Issue related to forcing (generation, loading, etc.) label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forcing Issue related to forcing (generation, loading, etc.)
Projects
None yet
Development

No branches or pull requests

3 participants