NOAA-GFDL / xwmt

Python package for water mass transformation analysis that leverages xarray functionality
https://xwmt.readthedocs.io/
MIT License
7 stars 5 forks source link

Unnecessarily duplicated code #41

Open hdrake opened 11 months ago

hdrake commented 11 months ago

We currently have separate conditions for transforming in temperature/salinity coordinates and density coordinates (see https://github.com/hdrake/xwmt/blob/84a0baeb775eefd44cd9ef6c02f25f30b5073559/xwmt/wmt.py#L360-L419). This is poor coding practice because we have to separately update each call whenever we make any changes, which makes it prone to bugs. We should be able to figure out a clever way to bundle all of these cases in one .transform call.