3 sa, p, pot_enthalpy_ice_freezing_sa, pot_enthalpy_ice_freezing_p)
28 real (r8),
intent(in) :: sa, p
29 real (r8),
intent(out),
optional :: pot_enthalpy_ice_freezing_sa
30 real (r8),
intent(out),
optional :: pot_enthalpy_ice_freezing_p
32 real (r8) :: p_r, sa_r, x
34 real (r8),
parameter :: d1 = -1.249490228128056e4_r8
35 real (r8),
parameter :: d2 = 1.336783910789822e4_r8
36 real (r8),
parameter :: d3 = -4.811989517774642e4_r8
37 real (r8),
parameter :: d4 = 8.044864276240987e4_r8
38 real (r8),
parameter :: d5 = -7.124452125071862e4_r8
39 real (r8),
parameter :: d6 = 2.280706828014839e4_r8
40 real (r8),
parameter :: d7 = 0.315423710959628e3_r8
41 real (r8),
parameter :: d8 = -3.592775732074710e2_r8
42 real (r8),
parameter :: d9 = 1.644828513129230e3_r8
43 real (r8),
parameter :: d10 = -4.809640968940840e3_r8
44 real (r8),
parameter :: d11 = 2.901071777977272e3_r8
45 real (r8),
parameter :: d12 = -9.218459682855746e2_r8
46 real (r8),
parameter :: d13 = 0.379377450285737e3_r8
47 real (r8),
parameter :: d14 = -2.672164989849465e3_r8
48 real (r8),
parameter :: d15 = 5.044317489422632e3_r8
49 real (r8),
parameter :: d16 = -2.631711865886377e3_r8
50 real (r8),
parameter :: d17 = -0.160245473297112e3_r8
51 real (r8),
parameter :: d18 = 4.029061696035465e2_r8
52 real (r8),
parameter :: d19 = -3.682950019675760e2_r8
54 real (r8),
parameter :: f1 = -2.034535061416256e4_r8
55 real (r8),
parameter :: f2 = 0.315423710959628e3_r8
56 real (r8),
parameter :: f3 = -0.239518382138314e3_r8
57 real (r8),
parameter :: f4 = 0.822414256564615e3_r8
58 real (r8),
parameter :: f5 = -1.923856387576336e3_r8
59 real (r8),
parameter :: f6 = 0.967023925992424e3_r8
60 real (r8),
parameter :: f7 = -0.263384562367307e3_r8
61 real (r8),
parameter :: f8 = -5.051613740291480e3_r8
62 real (r8),
parameter :: f9 = 7.587549005714740e2_r8
63 real (r8),
parameter :: f10 = -3.562886653132620e3_r8
64 real (r8),
parameter :: f11 = 5.044317489422632e3_r8
65 real (r8),
parameter :: f12 = -2.105369492709102e3_r8
66 real (r8),
parameter :: f13 = 6.387082316647800e2_r8
67 real (r8),
parameter :: f14 = -4.807364198913360e2_r8
68 real (r8),
parameter :: f15 = 8.058123392070929e2_r8
69 real (r8),
parameter :: f16 = -5.524425029513641e2_r8
75 if (
present(pot_enthalpy_ice_freezing_sa)) pot_enthalpy_ice_freezing_sa = &
76 (d1 + x*(d2 + x*(d3 + x*(d4 + x*(d5 + d6*x)))) &
77 + p_r*(d7 + x*(d8 + x*(d9 + x*(d10 + x*(d11 + d12*x)))) &
78 + p_r*(d13 + x*(d14 + x*(d15 + d16*x)) &
79 + p_r*(d17 + x*(d18 + d19*x)))))*1e-2_r8
81 if (
present(pot_enthalpy_ice_freezing_p)) pot_enthalpy_ice_freezing_p = &
82 (f1 + sa_r*(f2 + x*(f3 + x*(f4 + x*(f5 + x*(f6 + f7*x))))) &
83 + p_r*(f8 + sa_r*(f9 + x*(f10 + x*(f11 + f12*x))) &
84 + p_r*(f13 + sa_r*(f14 + x*(f15 + f16*x)))))*1e-8_r8
elemental subroutine gsw_pot_enthalpy_ice_freezing_first_derivatives_poly(sa, p, pot_enthalpy_ice_freezing_sa, pot_enthalpy_ice_freezing_p)