esm-tools / pymorize

A Python based Tool to CMORize NetCDF Data
MIT License
0 stars 1 forks source link

PSU Conversion #40

Open pgierz opened 6 days ago

pgierz commented 6 days ago

We should add a general purpose PSU unit converter to avoid salinity not being a real "unit"

Currently, converting psu -> 0.001:

pymorize.units:handle_unit_conversion:120 - Converting units: psu -> 0.001

Gives:

ValueError: Cannot convert variables:
    incompatible units for variable 'so': Unit expression cannot have a scaling factor.

See more ideas here.

This needs to go in src/pymorize/units.py as a general case added to the unit registry.