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

Cmorize cru v4.04 & stn contraint #1981

Closed
wants to merge 21 commits into from
Closed

Conversation

mwjury
Copy link
Contributor

@mwjury mwjury commented Jan 13, 2021

Description

  • This is an update from CRU v4.02 to v4.04.
  • Additionally an error in the time coordinate is fixed.
  • Masking of data was added for grid points that have not been informed by station information and for which data is provided by statistic infilling of climatologic values. This results in additional cmorized output with version string TS4.04-stn1.

Checklist

It is the responsibility of the author to make sure the PR is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.

New or updated data reformatting script:

@mwjury
Copy link
Contributor Author

mwjury commented Jan 15, 2021

#1980 causing failed tests

Copy link
Contributor

@valeriupredoi valeriupredoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cheers @mwjury - I will merge once we merge the fix to the iris documentation from #2012 🍺

Copy link
Contributor

@remi-kazeroni remi-kazeroni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @mwjury! This is almost ready to be merged I think. Please just merge the master branch into this branch and extend the time_range to 2019 in the recipe_check_obs.yml. We could merge this PR after that.

@hb326
Copy link
Contributor

hb326 commented May 5, 2021

This seems to be pretty much done, right? @remi-kazeroni fixed the end year to 2019, and #2021 seems to be merged, right @valeriupredoi?

@hb326
Copy link
Contributor

hb326 commented May 11, 2021

@valeriupredoi: and this was one of the PR I wanted you to comment on.

Copy link
Contributor

@valeriupredoi valeriupredoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, I am just a bit quizzical about a relatively involved function that could be as simple as changing all days to the 15th of the month?

esmvaltool/cmorizers/obs/cmorize_obs_cru.py Show resolved Hide resolved
@mwjury mwjury requested a review from remi-kazeroni June 1, 2021 08:06
Copy link
Contributor

@remi-kazeroni remi-kazeroni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything works fine for me, thanks @mwjury!

@remi-kazeroni
Copy link
Contributor

This is another example where updating the cmorizer would delete the previous version (c.f. #2189). This case is a but simpler because the cmorizer script has not changed much (but the fix for the time coordinate differs between the 2 versions). So I'm not sure what is optimal between having:

  • one config file and one cmorizer script per dataset version
  • one config file per dataset version and a script that works on both
  • a config file and a script for the latest version and leaving the information about older versions commented out.

Besides, we have a few recipes that are using the version TS4.02 of the CRU data for which we would delete the cmorizer by merging this PR: recipe_anav13jclim.yml, recipe_martin18grl.yml, schlund20jgr/recipe_schlund20jgr_gpp_change_rcp85.yml and schlund20jgr/recipe_schlund20jgr_gpp_abs_rcp85.yml. So it would be better for reproducibility reasons to keep both versions of the cmorizer.

I'd preferto solve that issue before merging this PR.

@katjaweigel
Copy link
Contributor

katjaweigel commented Jun 27, 2023

How to continue with this PR?
There are already newer CRU Versions by now, latest at the moment:
[20 April 2023 CRU TS & CRU CY v4.07 released] (https://crudata.uea.ac.uk/cru/data/hrg/index.htm#current)
I would like to add additional Variables from this data set, e.g. evspsblpot (PET).

@katjaweigel katjaweigel self-assigned this Jun 27, 2023
@remi-kazeroni
Copy link
Contributor

I would recommend to this close this PR. It is outdated and still based on the old CMORizer interface. We could keep the branch for some time if it helps for future developments. Instead, you could open a new PR from latest main. Regarding the supported versions of the dataset, we now have a policy for that: https://docs.esmvaltool.org/en/latest/community/multiple_dataset_versions.html. Note that CRU is used in quite a few recipes. The science question is: shall we retire support for the old version or shall we support 2 versions in parallel? If the former, I would recommend to use the naming convention and implementation for GCP2018/2020. If the latter, you could try to reproduce what's done for the WOA CMORizer. This is a good example on how we can support multiple versions without creating too many datasets (like CRU4-02 and CRU4-07).

@katjaweigel
Copy link
Contributor

Dear @remi-kazeroni thanks a lot for your answer! Because there are several recipes using CRU and because the data set is not too large (monthly data, limited number of variables) I think it would be best to support two versions in parallel. I will have a look at the the WOA CMORizer. We should keep the branch at the moment, because in addition to the version change it contains a fix for an error in the time coordinate and I first need to check if that is relevant for CRU 4.02 and 4.07 as well.

@lukruh
Copy link
Contributor

lukruh commented Oct 12, 2023

I checked the CRU (TS) v4.06 and v4.07 and the time coordinate are not exactly centered. They are set to 16th 00:00:00 of each month (15th for februrary). Fixing them would provide exact boundaries and centered points. If this cause any changes in the results of the mentioned recipes they should be small. However, to be sure not to break them we could add the fix for v4.06+ when approaching a multi version CMORizer as in WOA. Should the download script also support multiple versions?

Another thing that seems to be missing in the current formatters/cru.py is the number of stations. I'm not sure if it's needed, but would it be a good idea to add it to the cube somehow (i.e. via auxiliary coordinate)?

This was referenced Oct 12, 2023
@lukruh
Copy link
Contributor

lukruh commented May 31, 2024

As the PR for latest CRU Versions is merged now (including the time fix) I think this PR can be closed. @mwjury?

@lukruh lukruh closed this Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants