eosall_from_theta

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$ ^{-3}$) rho_s : partial derivative wrt s (kg m$ ^{-3}$ psu$ ^{-1}$) rho_th : partial derivative wrt th (kg m$ ^{-3}$ deg C$ ^{-1}$)

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 NONE
INPUT PARAMETERS:
    REALTYPE, intent(in)      :: th ! potential temperature degC
    REALTYPE, intent(in)      :: s  ! in situ salinity PSU
    REALTYPE, intent(in)      :: p  ! pressure in dbars
OUTPUT PARAMETERS:
    REALTYPE, intent(out)     :: rho_s   ! partial derivative wrt s
    REALTYPE, intent(out)     :: rho_th  ! partial derivative wrt th
REVISION 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



kklingbe 2017-10-02