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

[WIP] - Dimension handling #137

Merged
merged 10 commits into from
Mar 17, 2020
Merged

[WIP] - Dimension handling #137

merged 10 commits into from
Mar 17, 2020

Conversation

Balinus
Copy link
Member

@Balinus Balinus commented Mar 13, 2020

This is a WIP for handling dimension in a more general way.

The idea is to first try to identify X, Y, Z and T dimensions using the axis attribute when present (optional in CF files). If not, the fallback is on the standard_name longitude, latitude and time (which is required in CF files).

Then, we should probably add units detection, etc.

I'll also add detection on long_names but this seems to be optional just like axis in CF files.

This is pretty rough right now, but it works with all my test files (CMIP, CORDEX and ERAINT files).

@codecov-io
Copy link

codecov-io commented Mar 14, 2020

Codecov Report

Merging #137 into master will decrease coverage by 0.33%.
The diff coverage is 73.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #137      +/-   ##
==========================================
- Coverage   88.94%   88.61%   -0.34%     
==========================================
  Files          11       12       +1     
  Lines        1475     1519      +44     
==========================================
+ Hits         1312     1346      +34     
- Misses        163      173      +10
Impacted Files Coverage Δ
src/ClimateTools.jl 100% <ø> (ø) ⬆️
src/cf_conventions.jl 53.84% <53.84%> (ø)
src/extract.jl 81.44% <83.33%> (+1.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3ac6f9...8e9e63c. Read the comment docs.

@Balinus Balinus requested a review from gaelforget March 16, 2020 14:29
@Balinus
Copy link
Member Author

Balinus commented Mar 16, 2020

ok, I think this is good to go. Now, detection is done by using axis, standard_name, long_name and units. Works on my test files but this would need another pair of eyes and some more testing.

@Balinus
Copy link
Member Author

Balinus commented Mar 16, 2020

Just noticed it needs some love for 4D fields

@Balinus Balinus merged commit ce7d94a into master Mar 17, 2020
@Balinus
Copy link
Member Author

Balinus commented Mar 17, 2020

Decided to merge this PR as soon as possible due to some operational needs.

@Balinus Balinus deleted the dim_handling branch April 2, 2020 18:05
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.

2 participants