Bay-Delta SELFE Tools

unit_conversions Module

unit_conversions.cfs_to_cms(x)

Convert cfs to cms

unit_conversions.cms_to_cfs(x)
unit_conversions.ec_psu_25c(ts_ec, hill_correction=True)

Convert scalar or vector ec to psu assuming 25C temperature and no low salinity correction

unit_conversions.ft_to_m(x)

Convert feet to meters

unit_conversions.m_to_ft(x)
unit_conversions.psu_ec_25c(psu, refine=True, hill_correction=True)

Conversion from psu to ec. If used without refinement, this is the Schemel conversion, otherwise uses root-finding Note that the round trip ec-psu-ec tends to wander a lot without refine = True. The refinement usually takes 4-6 iterations

unit_conversions.psu_ec_25c_scalar(psu, refine=True, hill_correction=True)

Conversion from psu to ec for a scalar. If used without refinement, this is the Schemel conversion, otherwise uses root-finding Note that the round trip ec-psu-ec tends to wander a lot without refine = True. The refinement usually takes 4-6 iterations

unit_conversions.psu_ec_resid(x, psu, hill_correction)