FV3 Bundle
gsw_pt_from_pot_enthalpy_ice_poly.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_pt_from_pot_enthalpy_ice_poly (pot_enthalpy_ice)
3 !==========================================================================
4 !
5 ! Calculates the potential temperature of ice (whose reference sea
6 ! pressure is zero dbar) from the potential enthalpy of ice. This is a
7 ! compuationally efficient polynomial fit to the potential enthalpy of
8 ! ice.
9 !
10 ! pot_enthalpy_ice = potential enthalpy of ice [ J/kg ]
11 !
12 ! pt0_ice = potential temperature of ice (ITS-90) [ deg C ]
13 !--------------------------------------------------------------------------
14 
15 use gsw_mod_kinds
16 
17 implicit none
18 
19 real (r8), intent(in) :: pot_enthalpy_ice
20 
22 
23 real (r8), parameter :: q0 = 2.533588268773218e2_r8
24 real (r8), parameter :: q1 = 2.594351081876611e-3_r8
25 real (r8), parameter :: q2 = 1.765077810213815e-8_r8
26 real (r8), parameter :: q3 = 7.768070564290540e-14_r8
27 real (r8), parameter :: q4 = 2.034842254277530e-19_r8
28 real (r8), parameter :: q5 = 3.220014531712841e-25_r8
29 real (r8), parameter :: q6 = 2.845172809636068e-31_r8
30 real (r8), parameter :: q7 = 1.094005878892950e-37_r8
31 
32 ! The error of this fit ranges between -5e-5 and 2e-4 deg C over the potential
33 ! temperature range of -100 to 2 deg C, or the potential enthalpy range of
34 ! -5.7 x 10^5 to -3.3 x 10^5 J/kg.
35 
37  + pot_enthalpy_ice*(q1 + pot_enthalpy_ice*(q2 + pot_enthalpy_ice*(q3 &
38  + pot_enthalpy_ice*(q4 + pot_enthalpy_ice*(q5 + pot_enthalpy_ice*(q6 &
39  + pot_enthalpy_ice*q7))))))
40 
41 return
42 end function
43 
44 !--------------------------------------------------------------------------
elemental real(r8) function gsw_pt_from_pot_enthalpy_ice_poly(pot_enthalpy_ice)