-
Notifications
You must be signed in to change notification settings - Fork 0
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
Extract forecast reference time #118
Conversation
Adding Martin as a reviewer to help clarify what is required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. But note that I'm missing some of the domain knowledge needed to give a more 'conceptual' approval, so probably wait for others to give their review :D
Pulling this section out into a separate function sounds like a good idea! I'm still trying to understand the original version of the code, but have a couple of comments and questions so far: It's a bit tricky to follow I think because of the dynamic overwrite of the um2nc-standalone/umpost/um2netcdf.py Lines 95 to 110 in d711729
When I load in an ESM1.5 output file independently, e.g.
Because of the
I think it would be good to test this branch eventually. Paleoclimate simulations usually use years before @MartinDix, do you know why the um2nc-standalone/umpost/um2netcdf.py Lines 367 to 369 in d711729
I'm wondering if it's to ensure that the calendar of dump files isn't changed, e.g. um2nc-standalone/umpost/um2netcdf.py Lines 388 to 390 in d711729
but thought it would be good to double check! |
I'll link in some previous work on |
Update: following the 9/10/2024 handover meeting, work on this will be split into 2 parts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass, didn't have time to check the tests. Can take another look tomorrow.
This PR has given us several open questions & highlighted that the requirements are not really known. This function partly blocks work to fix structural/architectural repairs too. To address all these, how is the following?
How does that sound? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the modularisation step looks good, and looks like it will behave exactly the same as before.
Setting up the tests and fixtures for this seems very tricky and intricate though, especially due to the pg_calendar
overwrite. I'm wondering whether it would be easiest/fastest for this PR to just do the extraction into a separate function, and defer all of the tests to #141?
@blimlim ^ @aidanheerdegen do you want to check over the recent sets of changes & confirm if they cover the discussion threads here? I'll define "cover" as implements smaller fixes OR makes a note for a future fix. |
Changes look good Would you be happy to add comments to the |
That's gone in with 3820528. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LFTM
There was a problem hiding this 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
Yep, initial attempts at testing were fiddly & nasty to set up the data structures. Approaching in small, logical steps, extracting helper funcs etc should make things better with gradual logic reduction. I've also referenced #141 in the main body of this PR. |
First step to doing #100.
This PR is intended for facilitating testing functionality for fixing the forecast reference time.
As of late Sept 2024, work up to commit fd664c7 only provides a skeleton of unit tests. It doesn't meaningfully test any cube time changes. This PR includes some skipped tests as the testing required is unclear.
Work on this PR needs to answer & address the following:
time.units.calendar == 'gregorian'
code branch & testing required?time.units.calendar == 'proleptic_gregorian'
code branch & testing required?test_fix_forecast_reference_time_standard()
required?These questions will help determine what work is required. Any comments/ideas welcome!
Fixing & testing this function is specified in #141.