pyvista / pyvista-xarray

xarray DataArray accessors for PyVista
Apache License 2.0
98 stars 6 forks source link

Add cf conventions helper #31

Open banesullivan opened 2 years ago

banesullivan commented 2 years ago

Resolves #15

I feel this should be double-checked by someone more familiar with CF conventions and how that accessor works.

Also, this should be tested against more datasets

cc @rabernat, any feedback here? The premise is that the new function added here can attempt to use cf_xarray to get the XYZ coordinate array names when the user does not specify names.

In future work, this can be used to address #19

codecov-commenter commented 2 years ago

Codecov Report

Merging #31 (949d7cc) into main (3231ba8) will increase coverage by 0.63%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
+ Coverage   90.73%   91.36%   +0.63%     
==========================================
  Files           8        9       +1     
  Lines         205      220      +15     
==========================================
+ Hits          186      201      +15     
  Misses         19       19              
Impacted Files Coverage Δ
pvxarray/accessor.py 96.29% <100.00%> (+0.46%) :arrow_up:
pvxarray/cf.py 100.00% <100.00%> (ø)

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 3231ba8...949d7cc. Read the comment docs.

TomNicholas commented 2 years ago

cc'ing @dcherian as a cf-xarray pro