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

Correct datetime for some models #453

Merged
merged 11 commits into from
Feb 28, 2023
Merged

Conversation

Mayetea
Copy link
Contributor

@Mayetea Mayetea commented Jan 16, 2023

In the tutorial 08_Getting_and_bias_correcting_CMIP6_data, the datetime format of some models weren't in the good format for the data extraction of the desired duration. I've managed to correct the issue by transforming the non-standard calendar in numpy.datetime64 which is the desired format. It is now possible to use these models also: CMCC-ESM2, CanESM5, FGOALS-g3, INM-CM4-8 and INM-CM5-0.

The datetime format of some models data weren't in the good format for the correction manipulation and training. I've managed to correct the issue by transforming the non-standard calendar in numpy.datetime64 which is the desired format. It is now possible to use these models also: CMCC-ESM2, CanESM5, FGOALS-g3, INM-CM4-8 and INM-CM5-0.
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@huard
Copy link
Contributor

huard commented Jan 16, 2023

I suggest using ds = ds.convert_calendar('standard') instead.

See https://docs.xarray.dev/en/stable/generated/xarray.Dataset.convert_calendar.html

Zeitsperre and others added 4 commits January 16, 2023 17:00
Changed the conversion with the recommendation of David (using the convert_calendar method of Dataset)
@Mayetea
Copy link
Contributor Author

Mayetea commented Jan 17, 2023

I've changed the way we convert the calendar and it's working. I pushed it, so a new review would be appreciated. Thanks!

@Zeitsperre Zeitsperre added the enhancement New feature or request label Feb 24, 2023
@Zeitsperre
Copy link
Contributor

To give this a chance to get into the next version, I'll wait for @huard's review before preparing the release.

@huard
Copy link
Contributor

huard commented Feb 28, 2023

There are a couple of weird warnings in the nb, can these be fixed ?
Also, the last graphics at the end of the nb seem to be missing.

@Zeitsperre Zeitsperre mentioned this pull request Feb 28, 2023
@Mayetea
Copy link
Contributor Author

Mayetea commented Feb 28, 2023

I have the graphics on my side. I'm looking into the odd, Latitude warning. The rest seems to be good

@Mayetea
Copy link
Contributor Author

Mayetea commented Feb 28, 2023

So the warning for Latitude were from the chosen model, which crashes in the original nb. I switch back to MIROC6 (like in the original) since it doesnt have any odd warning. The other warnings were already in the original nb, but I can look into it in another issue/PR.

@Zeitsperre Zeitsperre merged commit 140c892 into Ouranosinc:master Feb 28, 2023
Zeitsperre added a commit that referenced this pull request Aug 17, 2023
In the tutorial 08_Getting_and_bias_correcting_CMIP6_data, the datetime
format of some models weren't in the good format for the data extraction
of the desired duration. I've managed to correct the issue by
transforming the non-standard calendar in numpy.datetime64 which is the
desired format. It is now possible to use these models also: CMCC-ESM2,
CanESM5, FGOALS-g3, INM-CM4-8 and INM-CM5-0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants