Skip to content

[Add feature] Add cf compliant attributes #84

@rcaneill

Description

@rcaneill

Hello, thanks for the great gsw package!
While using it with xarray, I thought that it would be very nice that gsw adds all the cf compliant (or at least the standard name + unit) attributes to the returned DataArray. I quickly went through the code, but everything is wrapped / ufuncs so I did not find any easy solution to add the attributes.

Does any of the core developer has any idea on this? If yes, I'll be happy to implement / test it (at least for the most common variables, as e.g. conservative and potential temperatures, sigma0, absolute salinity). If that was done, it would make it very easy to use the cf-xarray package with the outputs of gsw.

Another solution would be to create another package, e.g. cf-xarray-gsw, that would wrap all the gsw function, and add the proper attributes. Such a package could then work on datasets by using the cf attributes for the standard names to automatically get the proper input variables for the function calls (maybe a discussion on this should be started elsewhere than here).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions