modscripps / velosearaptor

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

Add CF names to madcp dataset output #26

Closed gunnarvoet closed 2 years ago

gunnarvoet commented 2 years ago

A first stab at assigning CF-compliant variable names to output (#16).

Still to do:

gunnarvoet commented 2 years ago

Thanks so much for all the thoughtful comments, super helpful!

I was thinking that if a variable doesn't have a standard name we shouldn't make one up, just in case it does get one in the future which is different from what we choose. (or we request a new one!)

Yes, I agree. Seems fine to have some non-CF variables in the output. When sending data to an archive, those can always be deleted from the dataset if the archiving system complains. Or as you say we request a name =)

I was also wondering if we should still specify units for variables that are unitless but use a symbol like "-" or just not include that field? I don't have a strong preference. Edit: Looks like the "correct" way is to specify a unit of "1"

The only reason that I am against using "1" is that it looks ugly when using the xarray plotting routines, although I might end up writing some mapping that transforms units like "m s-1" into nicer latex format and could take care of the "1" there. Do you have a preference?

On what to do with your standard deviation, could you recast it as an error? In which case it would be an ancillery data type and could use the name modifier standard_error. (Although you'd have to divide by sqrt(npings) for it to be a real error)

Yes, hesitant to call it an error. Standard deviation is just the more precise description of what it is. We could divide it by sqrt(npings) though, I like that.

If you have thoughts on how to name variables in the raw ADCP output feel free to pull the branch and add some changes! I will go ahead and make modifications with your suggested changes above to the processed output.

jessecusack commented 2 years ago

The only reason that I am against using "1" is that it looks ugly when using the xarray plotting routines,

I would be fine just leaving out the units for unitless quantities. Would your mapping be part of the plotting functionality of gadcp?

If you have thoughts on how to name variables in the raw ADCP output feel free to pull the branch and add some changes!

I'll try and get to this after the bin mapping!

gunnarvoet commented 2 years ago

The only reason that I am against using "1" is that it looks ugly when using the xarray plotting routines,

I would be fine just leaving out the units for unitless quantities. Would your mapping be part of the plotting functionality of gadcp?

Not sure - I probably wouldn't want to add too much plotting functionality to leave this to the user.