modscripps / velosearaptor

python ADCP routines
https://modscripps.github.io/velosearaptor
GNU General Public License v3.0
8 stars 3 forks source link

CF compliant xarray variables #16

Closed jessecusack closed 1 year ago

jessecusack commented 2 years ago

When creating xarray objects it would be good to follow CF: https://cfconventions.org/Data/cf-standard-names/current/build/cf-standard-name-table.html

This mainly just means adding standard names (when defined), e.g.

Code like:

ds.u.attrs = dict(long_name="u", units="m/s")

Would become:

ds.u.attrs = dict(standard_name="eastward_sea_water_velocity", long_name="u", units="m s-1")

Changes would be needed in madcp.py and io.py.

gunnarvoet commented 2 years ago

Yes, sounds like a great idea! In the long run this should also make it easier to interface with data coming from other packages?!

jessecusack commented 2 years ago

Right! And could go straight into long-term archives with minimal additional effort.

For this to work I think it would need a dictionary that maps variable names to CF standard names.

gunnarvoet commented 1 year ago

Closed with #50.