FV3 Bundle
gsw_t_freezing_first_derivatives_poly.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental subroutine gsw_t_freezing_first_derivatives_poly (sa, p, &
3  saturation_fraction, tfreezing_sa, tfreezing_p)
4 !==========================================================================
5 !
6 ! Calculates the frist derivatives of the in-situ temperature at which
7 ! seawater freezes with respect to Absolute Salinity SA and pressure P (in
8 ! Pa). These expressions come from differentiating the expression that
9 ! defines the freezing temperature, namely the equality between the
10 ! chemical potentials of water in seawater and in ice.
11 !
12 ! SA = Absolute Salinity [ g/kg ]
13 ! p = sea pressure [ dbar ]
14 ! ( i.e. absolute pressure - 10.1325 dbar )
15 ! saturation_fraction = the saturation fraction of dissolved air in
16 ! seawater
17 !
18 ! tfreezing_SA = the derivative of the in-situ freezing temperature
19 ! (ITS-90) with respect to Absolute Salinity at fixed
20 ! pressure [ K/(g/kg) ] i.e. [ K kg/g ]
21 !
22 ! tfreezing_P = the derivative of the in-situ freezing temperature
23 ! (ITS-90) with respect to pressure (in Pa) at fixed
24 ! Absolute Salinity [ K/Pa ]
25 !--------------------------------------------------------------------------
26 
28 
30 
31 use gsw_mod_kinds
32 
33 implicit none
34 
35 real (r8), intent(in) :: sa, p, saturation_fraction
36 real (r8), intent(out), optional :: tfreezing_sa, tfreezing_p
37 
38 real (r8) :: p_r, sa_r, x
39 
40 real (r8), parameter :: c = 1e-3_r8/(2.0_r8*gsw_sso)
41 
42 sa_r = sa*1e-2_r8
43 x = sqrt(sa_r)
44 p_r = p*1e-4_r8
45 
46 if (present(tfreezing_sa)) tfreezing_sa = &
47  (t1 + x*(1.5_r8*t2 + x*(2.0_r8*t3 + x*(2.5_r8*t4 + x*(3.0_r8*t5 &
48  + 3.5_r8*t6*x)))) + p_r*(t10 + x*(1.5_r8*t11 + x*(2.0_r8*t13 &
49  + x*(2.5_r8*t16 + x*(3.0_r8*t19 + 3.5_r8*t22*x)))) &
50  + p_r*(t12 + x*(1.5_r8*t14 + x*(2.0_r8*t17 + 2.5_r8*t20*x)) &
51  + p_r*(t15 + x*(1.5_r8*t18 + 2.0_r8*t21*x)))))*1e-2_r8 &
52  + saturation_fraction*c
53 
54 if (present(tfreezing_p)) tfreezing_p = &
55  (t7 + sa_r*(t10 + x*(t11 + x*(t13 + x*(t16 + x*(t19 + t22*x))))) &
56  + p_r*(2.0_r8*t8 + sa_r*(2.0_r8*t12 + x*(2.0_r8*t14 + x*(2.0_r8*t17 &
57  + 2.0_r8*t20*x))) + p_r*(3.0_r8*t9 + sa_r*(3.0_r8*t15 + x*(3.0_r8*t18 &
58  + 3.0_r8*t21*x)))))*1e-8_r8
59 
60 return
61 end subroutine
62 
63 !--------------------------------------------------------------------------
elemental subroutine gsw_t_freezing_first_derivatives_poly(sa, p, saturation_fraction, tfreezing_sa, tfreezing_p)