NCAR / pop-tools

Tools to support analysis of POP2-CESM model solutions
https://pop-tools.readthedocs.io
Apache License 2.0
22 stars 29 forks source link

eos() returns incorrect units for dRHOdS #146

Open sgyeager opened 2 years ago

sgyeager commented 2 years ago

Calling eos() with return_coefs=True yields dRHOdS with units 'kg/m^3/degC'. I believe the correct units should be 'kg/m^3/g/kg'.

mnlevy1981 commented 2 years ago

Thanks for opening an issue ticket about this! This was brought up under discussions (https://github.com/NCAR/pop-tools/discussions/143), but should have been converted to an issue.

From when I looked through the code, I saw a factor of 1000 that led me to believe the units are kg/m^3/kg/kg:

https://github.com/NCAR/pop-tools/blob/f8dc20b9962e0fdc7b9a1995503e368ff326e3e7/pop_tools/eos.py#L326

we should definitely figure out if it is kg/m^3/g/kg or kg/m^3/kg/kg before addressing with a PR