ESMValGroup / ESMValTool

ESMValTool: A community diagnostic and performance metrics tool for routine evaluation of Earth system models in CMIP
https://www.esmvaltool.org
Apache License 2.0
223 stars 128 forks source link

ERA5 on-the-fly cmorizer produces wrong date format #1731

Closed hb326 closed 4 years ago

hb326 commented 4 years ago

I just ran the ERA5 cmorizer recipe "recipe_era5.yml" to produce a monthly mean ERA5 total precipitation file. This is the recipe that I used:

documentation: description: CMORize ERA5 data

authors:

  • andela_bouwe
  • kalverla_peter

references:

  • acknow_project

projects:

  • ewatercycle

datasets:

  • {dataset: ERA5, project: native6, type: reanaly, version: v1, tier: 3, start_year: 1979, end_year: 2019}

diagnostics: monthly: description: CMORize monthly ERA5 data scripts: rename: script: cmorizers/era5.py variables: pr: mip: Amon era5_name: total_precipitation era5_freq: monthly

I get a netCDF file as output with the name OBS6_ERA5_reanaly_v1_Amon_pr_1979-2018.nc. I have two problems regarding the output I get:

  1. Using ncdump to look at the header of the file shows me that the available time steps are 492, which means that the year 2019 is indeed included in the file, although the filename says differently.
  2. There are no months added to the start_ and end_year of the netCDF file which would be necessary for the ESMValTool to read the file correctly, right?

Are these bugs in the cmorizer, or do I have to define something differently in the recipe?

mattiarighi commented 4 years ago

For 1., the reason could be here: https://github.com/ESMValGroup/ESMValTool/blob/6d118c5c9dfd4eb4db85d04f135ec1ebbdf022d0/esmvaltool/diag_scripts/cmorizers/era5.py#L29-L31

Why is it int(end_year) - 1?

SarahAlidoost commented 4 years ago

For 1., the reason could be here: https://github.com/ESMValGroup/ESMValTool/blob/6d118c5c9dfd4eb4db85d04f135ec1ebbdf022d0/esmvaltool/diag_scripts/cmorizers/era5.py#L29-L31

Why is it int(end_year) - 1?

Please see issue #1659