360 days calendar support#144
Conversation
…that ds has actually 360 day calendar
… checking services convert_360day_calendar
|
This was ready but I am actually unable to make For reference, I also tried with this manual testing code |
… another core funct
…e a calendar option in the time series factory util for that
…d interpolation options and correction of its usage in standardize_gcm
|
@dgergel You could go a couple of different ways about testing this. Here it might be good to focus on testing for desired behavior near the code that has that responsibility. So, long story short, I think It'd hopefully be easier to write and check simple test cases rather than for the whole service. I'd clean up and refactor the core functions it needs so responsibility is clear, and then I'd test those for all the little tricky stuff. Because we're short on time, maybe just focus on cleaning up the calendar stuff changed in this PR. Thanks for coming to my ted talk. |
|
@brews thanks for the input. You make a lot of good points, but since we are in crunch mode let's table what you outlined until after Dec. 31st. Again, agree with what you said - but we don't have time to do this until after we produce our first round of deliverables. |
|
Yup. No sweat. Deadlines are a-comin' to town. 👍 |
…ys_calendar_support
|
@dgergel @brews thanks for the review. Just FYI : @dgergel I did see this part of your slack conversation with the You were saying there that it's fine for us to ignore this, since we don't expect In the case of randomly selected interpolation, it's quite tricky to keep track of pre existing nans, so it's taking me some time. Just wanted to let you know (and also, let me know if you really think it's unnecessary). |
|
@emileten would be great if we can go ahead and get this merged in ASAP so that we can rerun the 360-day cal models that we're including in our deliverable - any chance you could tie this up today? |
|
@dgergel yep, this will be merged today 👍 |
|
Ready to be merged, I added docs. Also, regarding my comment above about The code becomes messy if I try to preserve these values, and in any case would fail later at validation. So, I decided to add another Edit : this check is now skipped by default. |
|
We're missing a changelog entry for this PR. |
I just saw that @brews sorry. Can I add it directly in the main branch ? |
|
I beat you by 60 seconds, @emileten ! |
This PR adds support for 360-day calendar GCM input data. The changes are :
I added the function
xclim_convert_360day_calendar_interpolatetododola.core. This function takes a 360-day calendar time indexed dataset and converts its calendar to a chosen target calendar type, offering the option to interpolate the inserted missing values.This functionality is now used by default with linear interpolation in
standardize_gcmto handle the GCM data we currently use that has a 360-day calendar.I also added a test for this in
dodola.tests.test_core, which required to add acalendaroption in the_timeseriesfactoryfunction.This PR solves this downscaleCMIP6 issue.