INTERFACE:
subroutine eosall_from_theta(s,th,p,rho_s,rho_th)DESCRIPTION:
in-situ density and its derivatives (only 2) as functions of salinity, potential temperature and pressure as in Jackett, McDougall, Feistel, Wright and Griffies (2006), JAOT
s : salinity (psu) th : potential temperature (deg C, ITS-90) p : gauge pressure (dbar) (absolute pressure - 10.1325 dbar)
rho : in-situ density (kg m) rho_s : partial derivative wrt s (kg m psu) rho_th : partial derivative wrt th (kg m deg C)
check values : eosall_from_theta(20,20,1000,...) gives
rho = 1017.728868019642 rho_s = 0.7510471164699279 rho_th = -0.2570255211349140
based on DRJ on 10/12/03 USES:
IMPLICIT NONEINPUT PARAMETERS:
REALTYPE, intent(in) :: th ! potential temperature degC REALTYPE, intent(in) :: s ! in situ salinity PSU REALTYPE, intent(in) :: p ! pressure in dbarsOUTPUT PARAMETERS:
REALTYPE, intent(out) :: rho_s ! partial derivative wrt s REALTYPE, intent(out) :: rho_th ! partial derivative wrt thREVISION HISTORY:
AS 2009 based on code provided by Jackett 2005 See the log for the module !LOCAL VARIABLES REALTYPE :: th2,sqrts,anum,aden,pth REALTYPE :: rho,anum_s,aden_s,anum_th,aden_th,rec_aden