You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
1.2 KiB

#pragma once
#include "gswteos-10.h"
inline double Temp2PTemp(double temp, double psal, double depth, double lon, double lat) { return gsw_pt0_from_t(gsw_sa_from_sp(psal, depth, lon, lat), temp, depth); }
inline double PTemp2Temp(double ptemp, double psal, double depth, double lon, double lat)
{
double sa = gsw_sa_from_sp(psal, depth, lon, lat);
return gsw_t_from_ct(sa, gsw_ct_from_pt(sa, ptemp), depth);
}
inline double PTemp2PDens(double ptemp, double psal, double depth, double lon, double lat) { return gsw_rho_t_exact(gsw_sa_from_sp(psal, depth, lon, lat), ptemp, 0.0) - 1000.0; }
inline double Temp2PDens(double temp, double psal, double depth, double lon, double lat)
{
return gsw_pot_rho_t_exact(gsw_sa_from_sp(psal, depth, lon, lat), temp, depth, 0.0) - 1000.0;
}
inline double PTemp2SSpeed(double ptemp, double psal, double depth, double lon, double lat)
{
double sa = gsw_sa_from_sp(psal, depth, lon, lat);
return gsw_sound_speed_t_exact(sa, gsw_t_from_ct(sa, gsw_ct_from_pt(sa, ptemp), depth), depth);
}
inline double Temp2SSpeed(double temp, double psal, double depth, double lon, double lat) { return gsw_sound_speed_t_exact(gsw_sa_from_sp(psal, depth, lon, lat), temp, depth); }