19 real (r8),
intent(in) :: t
23 real (r8),
parameter :: g0 = 2.641463563366498e-1_r8
24 real (r8),
parameter :: g1 = 2.007883247811176e-4_r8
25 real (r8),
parameter :: g2 = -4.107694432853053e-6_r8
26 real (r8),
parameter :: g3 = 8.401670882091225e-8_r8
27 real (r8),
parameter :: g4 = -1.711392021989210e-9_r8
28 real (r8),
parameter :: g5 = 3.374193893377380e-11_r8
29 real (r8),
parameter :: g6 = -5.923731174730784e-13_r8
30 real (r8),
parameter :: g7 = 8.057771569962299e-15_r8
31 real (r8),
parameter :: g8 = -7.054313817447962e-17_r8
32 real (r8),
parameter :: g9 = 2.859992717347235e-19_r8
33 real (r8),
parameter :: sp2 = 2.0_r8
35 real (r8) :: t68, ft68, rtx0, dsp_drtx, sp_est, rtx, rtxm, x, part1, part2
36 real (r8) :: sqrty, sp_hill_raw_at_sp2
39 ft68 = (t68 - 15.0_r8)/(1.0_r8 +
k*(t68 - 15.0_r8))
45 rtx0 = g0 + t68*(g1 + t68*(g2 + t68*(g3 + t68*(g4 + t68*(g5 &
46 + t68*(g6 + t68*(g7 + t68*(g8 + t68*g9))))))))
48 dsp_drtx =
a1 + (2.0_r8*
a2 + (3.0_r8*
a3 + (4.0_r8*
a4 + 5.0_r8*
a5*rtx0)*rtx0)* &
50 ft68*(
b1 + (2.0_r8*
b2 + (3.0_r8*
b3 + (4.0_r8*
b4 + 5.0_r8*
b5*rtx0)*rtx0)* &
56 sp_est =
a0 + (
a1 + (
a2 + (
a3 + (
a4 +
a5*rtx0)*rtx0)*rtx0)*rtx0)*rtx0 &
57 + ft68*(
b0 + (
b1 + (
b2 + (
b3 + (
b4 +
b5*rtx0)*rtx0)*rtx0)*rtx0)*rtx0)
58 rtx = rtx0 - (sp_est - sp2)/dsp_drtx
59 rtxm = 0.5_r8*(rtx + rtx0)
60 dsp_drtx =
a1 + (2.0_r8*
a2 + (3.0_r8*
a3 + (4.0_r8*
a4 + 5.0_r8*
a5*rtxm)*rtxm)* &
62 + ft68*(
b1 + (2.0_r8*
b2 + (3.0_r8*
b3 + (4.0_r8*
b4 + 5.0_r8*
b5*rtxm)*rtxm)* &
64 rtx = rtx0 - (sp_est - sp2)/dsp_drtx
72 part1 = 1.0_r8 + x*(1.5_r8 + x)
73 part2 = 1.0_r8 + sqrty*(1.0_r8 + sqrty*(1.0_r8 + sqrty))
74 sp_hill_raw_at_sp2 = sp2 -
a0/part1 -
b0*ft68/part2
elemental real(r8) function gsw_hill_ratio_at_sp2(t)