Fix ERA5 native6 fix to handle single monthly-averaged NetCDF files.#2512
Conversation
|
Hi @schlunma, @valeriupredoi, Could someone please take a moment to review this for me? Thanks! R |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2512 +/- ##
==========================================
- Coverage 95.46% 95.42% -0.04%
==========================================
Files 260 260
Lines 15526 15513 -13
==========================================
- Hits 14822 14804 -18
- Misses 704 709 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
|
In order to maintain a backlog of relevant pull requests, we automatically label them as stale after 180 days of inactivity. If this pull request is still important to you, please comment below to remove the stale label. Otherwise, this pull request will be automatically closed in 60 days. If this pull request only suffers from a lack of reviewers, please tag the @ESMValGroup/technical-lead-development-team so they can help you find a suitable reviewer. |
|
I will look into this again to fix the single monthly files |
|
@schlunma @valeriupredoi @ESMValGroup/esmvaltool-developmentteam |
|
We discussed this feature in the associated issue, and there I suggested #2511 (comment). Does that not work? |
Ah I missed that sorry, I'll test it out and found that it still runs the ESMValCore/esmvalcore/cmor/_fixes/native6/era5.py Lines 585 to 587 in 9ef036a I can change this part in this PR |
|
@bouweandela I've updated, let me know what you think. thanks! |
bouweandela
left a comment
There was a problem hiding this comment.
Looks fine now. I wonder if we could completely get rid of the get_frequency function?
It would be nice to add a unit test, could you do that?
flicj191
left a comment
There was a problem hiding this comment.
Removing get_frequency I had to parse the frequency to fix_hourly_time_coordinate and fix_accumulated_units which I think works, similar to _fix_monthly_time_coord but the tests are failing, not sure what i'm missing? the fixes aren't applied? @bouweandela
This reverts commit 4948f38.
|
I have reverted the changes of removing the |
Pull request has changed since review and @schlunma is currently on leave.
Description
Modifies the
get_frequencyfunction in ERA5 native6 fix to handle case where monthly-averaged data are stored in single NetCDF file (one file per month) and have thus a time dimension length of 1.Closes #2511
Link to documentation:
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.
To help with the number pull requests: