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

Make tidync understand CF time dimension #124

Merged
merged 3 commits into from
Oct 25, 2023
Merged

Conversation

pvanlaake
Copy link
Contributor

Description

Many NetCDF files encode a "time" dimension using the COARDS and CF conventions: define a datum and apply offsets to it. Given the complexity of the different calendars, tidync currently does not support time decoding and displays the bare offsets. By importing package CFtime support for offset decoding into an intelligible time representation is now possible.

The main changes are in hyper_transforms.R, where the offset decoding takes place, and hyper_array.R, where dimnames() are assigned to the arrays as they are read from the NetCDF files. Further, minor changes are in tidync.R (exposing the attributes in the tidync class) and hyper_tibble.R (easier population of dimension name columns).

Related Issue

This patch fixes issue #54.

@pvanlaake
Copy link
Contributor Author

pvanlaake commented Oct 24, 2023

Errors upon submission of the PR seem to be related to an infrastructure upgrade at GitHub that isn't fully functional yet.

@mdsumner
Copy link
Collaborator

awesome, very much appreciated - passes check and revdeps pass as well (on linux at least)

@mdsumner mdsumner merged commit 42af413 into ropensci:main Oct 25, 2023
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants