23 real (r8),
intent(in) :: pot_enthalpy_ice
28 real (r8) :: df_dt, f, mod_pot_enthalpy_ice, pt0_cold_ice, recip_df_dt
29 real (r8) :: pt0_cold_ice_old, pt0_ice, pt0_ice_old, ptm_cold_ice, ptm_ice
31 real (r8),
parameter :: h00 = -6.320202333358860e5_r8
32 real (r8),
parameter :: p0 = 0.0_r8
34 mod_pot_enthalpy_ice =
max(pot_enthalpy_ice,h00)
36 if (mod_pot_enthalpy_ice.ge.-5.1e5_r8)
then 51 pt0_ice = pt0_ice_old - f*recip_df_dt
52 ptm_ice = 0.5_r8*(pt0_ice + pt0_ice_old)
54 pt0_ice = pt0_ice_old - f*recip_df_dt
69 pt0_cold_ice_old = pt0_cold_ice
71 pt0_cold_ice = pt0_cold_ice_old - f/df_dt
72 ptm_cold_ice = 0.5_r8*(pt0_cold_ice + pt0_cold_ice_old)
75 pt0_cold_ice = pt0_cold_ice_old - f/df_dt
77 pt0_ice = pt0_cold_ice
elemental real(r8) function gsw_pt_from_pot_enthalpy_ice(pot_enthalpy_ice)