37 real (r8),
intent(in) :: sa, ct, p
38 real (r8),
intent(out),
optional :: h_sa_sa, h_sa_ct, h_ct_ct
40 real (r8) :: dynamic_h_ct_ct_part, dynamic_h_sa_ct_part, dynamic_h_sa_sa_part
41 real (r8) :: xs, xs2, ys, z
47 if (
present(h_sa_sa))
then 50 dynamic_h_sa_sa_part = z*(-
h101 + xs2*(3.0_r8*
h301 + xs*(8.0_r8*
h401 &
57 -
h142*ys ))) + z*(xs2*(8.0_r8*
h403*xs + 3.0_r8*
h313*ys) &
65 if (
present(h_sa_ct))
then 67 dynamic_h_sa_ct_part = z*(
h111 + xs*(2.0_r8*
h211 + xs*(3.0_r8*
h311 &
68 + xs*(4.0_r8*
h411 + 5.0_r8*
h511*xs))) + ys*(2.0_r8*
h121 &
78 h_sa_ct = 1e8_r8*0.025_r8*0.5_r8*
gsw_sfac*dynamic_h_sa_ct_part/xs
82 if (
present(h_ct_ct))
then 84 dynamic_h_ct_ct_part = z*(2.0_r8*
h021 + xs*(2.0_r8*
h121 + xs*(2.0_r8*
h221 &
85 + xs*(2.0_r8*
h321 + 2.0_r8*
h421*xs))) + ys*(6.0_r8*
h031 &
87 + ys*(12.0_r8*
h041 + xs*(12.0_r8*
h141 + 12.0_r8*
h241*xs) &
88 + ys*(20.0_r8*
h051 + 20.0_r8*
h151*xs + 30.0_r8*
h061*ys))) &
94 + 12.0_r8*
h043*ys) + 2.0_r8*
h024*z)))
96 h_ct_ct = 1e8_r8*6.25e-4_r8*dynamic_h_ct_ct_part
real(r8), parameter offset
real(r8), parameter gsw_sfac
elemental subroutine gsw_enthalpy_second_derivatives(sa, ct, p, h_sa_sa, h_sa_ct, h_ct_ct)