Skip to content

Update CRU CMORizer #3381

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

Merged
merged 20 commits into from
May 31, 2024
Merged

Update CRU CMORizer #3381

merged 20 commits into from
May 31, 2024

Conversation

lukruh
Copy link
Contributor

@lukruh lukruh commented Oct 13, 2023

Description

This is a new approach to update the CRU CMORizer. It includes fixes for the time coordinate, adds the number of stations per cell and provides backwards compatible support for multiple versions of the dataset (TS4.02, TS4.06, TS4.07).

  • fix time coord (from Cmorize cru v4.04 & stn contraint #1981)
  • add evspsblpot (not in recipe_check_obs.yml yet)
  • update config and formatter to match WOA multi version style
  • add versions 4.07 and 4.06
  • save number of stations via AuxCoord (not compatible to all preproc functions)
  • update references in datasets.yml (set to newest only)
  • add more variables (evspsblpot, tasmin, tasmax, clt)
  • test formatter and recipes for 4.02
  • test affected recipes
    • recipe_anav13jclim.yml
    • recipe_martin18grl.yml
    • schlund20jgr/recipe_schlund20jgr_gpp_change_rcp85.yml
    • schlund20jgr/recipe_schlund20jgr_gpp_abs_rcp85.yml

Closes #3380


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request 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


To help with the number of pull requests:

@lukruh lukruh requested a review from a team as a code owner October 13, 2023 12:49
@lukruh lukruh marked this pull request as draft October 13, 2023 12:58
@lukruh lukruh self-assigned this Oct 13, 2023
@lukruh lukruh marked this pull request as ready for review November 10, 2023 15:44
@lukruh
Copy link
Contributor Author

lukruh commented Nov 10, 2023

Regarding support of multiple version support: The cmorizer is still able to reproduce the same cmorized data for v TS4.02 as before. However, changes to (downloader, ) datasets.yml and cmor_config/CRU.yml are required to do so. I'm not completly happy with it, but I hope its fine for the scope of this PR. (opened #3430)

Regarding codacy errors: Line lengths errors are caused by long urls, which I prefer not to break, but I can if required. The unused arguments seem to be required by the cmorizer class that imports the function. There are several formatters ignoring them, should we consider to make them optional?

@lukruh lukruh requested a review from hb326 November 10, 2023 15:50
@lukruh lukruh added this to the v2.11.0 milestone Nov 10, 2023
@lukruh
Copy link
Contributor Author

lukruh commented Dec 5, 2023

I'm thinking about throwing the number of stations coordinate out again. I don't even know if anyone would use it and it might clash with some simple simple iris operations like merging or substracting different parts of a cube.

@rbeucher
Copy link
Contributor

@flicj191 when you have some time, can you look at this please?

@flicj191
Copy link
Contributor

thanks @lukruh, from my experience you don't have to worry about the unused arguments codacy errors, that's been like that for a while. I have used this and downloaded and cmorized cru data on Gadi (Australia). It was picked up fine and comparable in an edited version of recipe_anav13jclim.yml
Data is on Gadi though I can't do that on DKRZ

@mo-gill
Copy link
Contributor

mo-gill commented May 2, 2024

Hi, we are currently working on the ESMValTool release for v2.11.0. We're wondering if you'd be able to complete this PR by the end of next week (Friday 10th May).

Otherwise, please let us know, and we'll move it into the next milestone for you 🙂

Copy link
Contributor

@rbeucher rbeucher 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 on my side.

Copy link
Contributor

@rbeucher rbeucher left a comment

Choose a reason for hiding this comment

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

Circle CI returns some formatting issues:

./esmvaltool/cmorizers/data/formatters/datasets/cru.py:7:80: E501 line too long (86 > 79 characters)
./esmvaltool/cmorizers/data/formatters/datasets/cru.py:8:80: E501 line too long (86 > 79 characters)
./esmvaltool/cmorizers/data/formatters/datasets/cru.py:9:80: E501 line too long (86 > 79 characters)
./build/lib/esmvaltool/cmorizers/data/formatters/datasets/cru.py:7:80: E501 line too long (86 > 79 characters)
./build/lib/esmvaltool/cmorizers/data/formatters/datasets/cru.py:8:80: E501 line too long (86 > 79 characters)
./build/lib/esmvaltool/cmorizers/data/formatters/datasets/cru.py:9:80: E501 line too long (86 > 79 characters)

Exited with code exit status 1

@lukruh
Copy link
Contributor Author

lukruh commented May 13, 2024

Circle CI returns some formatting issues:

./esmvaltool/cmorizers/data/formatters/datasets/cru.py:7:80: E501 line too long (86 > 79 characters)
./esmvaltool/cmorizers/data/formatters/datasets/cru.py:8:80: E501 line too long (86 > 79 characters)
./esmvaltool/cmorizers/data/formatters/datasets/cru.py:9:80: E501 line too long (86 > 79 characters)
./build/lib/esmvaltool/cmorizers/data/formatters/datasets/cru.py:7:80: E501 line too long (86 > 79 characters)
./build/lib/esmvaltool/cmorizers/data/formatters/datasets/cru.py:8:80: E501 line too long (86 > 79 characters)
./build/lib/esmvaltool/cmorizers/data/formatters/datasets/cru.py:9:80: E501 line too long (86 > 79 characters)

Exited with code exit status 1

@rbeucher Thanks for the review!
These are URLs to the source file. I personally prefer not to break them. With # noqa: E501 I can ignore the error locally but not for codacy. If you think I should break them I will do it. Can I consider your review as a technical or a scientific one?

@mo-gill From my side it could be merged, after a second review. If it's already to late feel free to move it to the next mile stone.

@rbeucher
Copy link
Contributor

Yes I would avoid breaking them. Technical review.

@lukruh lukruh requested a review from rbeucher May 15, 2024 19:30
@mo-gill mo-gill modified the milestones: v2.11.0, v2.12.0 May 24, 2024
Copy link
Contributor

@bettina-gier bettina-gier left a comment

Choose a reason for hiding this comment

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

Just change the version in the cmorize_obs recipe and all is good. Data in new version looks good, everything runs fine, small changes in recipe outputs, but that's what new versions come with - all scientifically plausible.
@ESMValGroup/obs-maintainers if Levante people want to just move the data from my folder to the public one:
raw: /work/bd0854/b309137/data_ext/RAW/Tier2/CRU
cmorized: /work/bd0854/b309137/data_ext/Tier2/CRU

@lukruh
Copy link
Contributor Author

lukruh commented May 24, 2024

Thanks for the review @bettina-gier. Good spot of v4.06 in the test recipe. I downloaded and tested both versions, the most recent one should stay in the test recipe of cause.

@rbeucher since you are fine with not breaking the urls, could you withdraw the change request and approve it again? I think with open change request it can not be merged. Thanks a lot.

@hb326
Copy link
Contributor

hb326 commented May 28, 2024

@lukruh and @bettina-gier: we have copied the data to the respective folders on Levante. All sorted.
@bettina-gier: you can delete them now from your work folder.

@bettina-gier bettina-gier merged commit c507d79 into main May 31, 2024
@bettina-gier bettina-gier deleted the update_cru_cmorizer branch May 31, 2024 13:49
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.

Update CMORizer for CRU
6 participants