47 real(
rp),
private :: ocean_phy_ice_mass_critical = 1600.0_rp
48 real(
rp),
private :: ocean_phy_ice_mass_limit = 50000.0_rp
49 real(
rp),
private :: ocean_phy_ice_fraction_limit = 1.0_rp
50 real(
rp),
private :: ocean_phy_ice_dt_max = 5.e-2_rp
52 logical,
private :: ocean_phy_ice_nudging = .false.
53 real(
dp),
private :: ocean_phy_ice_nudging_tausec
54 logical,
private :: ocean_phy_ice_offline_mode = .false.
70 real(
dp) :: ocean_phy_ice_nudging_tau = 0.0_dp
71 character(len=H_SHORT) :: ocean_phy_ice_nudging_tau_unit =
"SEC"
72 character(len=H_LONG) :: ocean_phy_ice_nudging_basename =
''
73 logical :: ocean_phy_ice_nudging_basename_add_num = .false.
74 integer :: ocean_phy_ice_nudging_number_of_files = 1
75 logical :: ocean_phy_ice_nudging_enable_periodic_year = .false.
76 logical :: ocean_phy_ice_nudging_enable_periodic_month = .false.
77 logical :: ocean_phy_ice_nudging_enable_periodic_day = .false.
78 integer :: ocean_phy_ice_nudging_step_fixed = 0
79 real(
rp) :: ocean_phy_ice_nudging_offset = 0.0_rp
80 real(
rp) :: ocean_phy_ice_nudging_defval
81 logical :: ocean_phy_ice_nudging_check_coordinates = .true.
82 integer :: ocean_phy_ice_nudging_step_limit = 0
84 namelist / param_ocean_phy_ice / &
86 ocean_phy_ice_mass_critical, &
87 ocean_phy_ice_mass_limit, &
88 ocean_phy_ice_fraction_limit, &
109 log_info(
"OCEAN_PHY_ICE_setup",*)
'Setup'
111 ocean_phy_ice_nudging_defval = undef
115 read(
io_fid_conf,nml=param_ocean_phy_ice,iostat=ierr)
117 log_info(
"OCEAN_PHY_ICE_setup",*)
'Not found namelist. Default used.'
118 elseif( ierr > 0 )
then
119 log_error(
"OCEAN_PHY_ICE_setup",*)
'Not appropriate names in namelist PARAM_OCEAN_PHY_ICE. Check!'
122 log_nml(param_ocean_phy_ice)
125 log_info(
"OCEAN_PHY_ICE_setup",*)
'Ice amount for frac. = 1 [kg/m2] : ', ocean_phy_ice_mass_critical
126 if ( ocean_phy_ice_nudging )
then
127 call calendar_unit2sec( ocean_phy_ice_nudging_tausec, ocean_phy_ice_nudging_tau, ocean_phy_ice_nudging_tau_unit )
129 log_info(
"OCEAN_PHY_ICE_setup",*)
'Use nudging for sea ice fraction : ON'
130 log_info(
"OCEAN_PHY_ICE_setup",*)
'Relaxation time Tau [sec] : ', ocean_phy_ice_nudging_tausec
132 if ( ocean_phy_ice_nudging_tausec == 0.0_rp )
then
133 ocean_phy_ice_offline_mode = .true.
134 log_info(
"OCEAN_PHY_ICE_setup",*)
'Tau=0 means that sea ice is completely replaced by the external data.'
137 if ( ocean_phy_ice_nudging_basename ==
'' )
then
138 log_error(
"OCEAN_PHY_ICE_setup",*)
'OCEAN_PHY_ICE_nudging_basename is necessary. STOP'
142 log_info(
"OCEAN_PHY_ICE_setup",*)
'Use nudging for sea ice fraction : OFF'
145 if ( ocean_phy_ice_nudging )
then
147 ocean_phy_ice_nudging_basename_add_num, &
148 ocean_phy_ice_nudging_number_of_files, &
151 ocean_phy_ice_nudging_enable_periodic_year, &
152 ocean_phy_ice_nudging_enable_periodic_month, &
153 ocean_phy_ice_nudging_enable_periodic_day, &
154 ocean_phy_ice_nudging_step_fixed, &
155 ocean_phy_ice_nudging_offset, &
156 ocean_phy_ice_nudging_defval, &
157 check_coordinates = ocean_phy_ice_nudging_check_coordinates, &
158 step_limit = ocean_phy_ice_nudging_step_limit )
172 integer,
intent(in) :: oia, ois, oie
173 integer,
intent(in) :: oja, ojs, oje
174 real(
rp),
intent(in) :: ice_mass(oia,oja)
175 real(
rp),
intent(out) :: ice_frac(oia,oja)
182 ice_frac(i,j) = ice_mass(i,j) / ocean_phy_ice_mass_critical
184 ice_frac(i,j) = min( sqrt( max( ice_frac(i,j), 0.0_rp ) ), ocean_phy_ice_fraction_limit )
212 integer,
intent(in) :: oia, ois, oie
213 integer,
intent(in) :: oja, ojs, oje
214 logical,
intent(in) :: calc_flag (oia,oja)
215 real(
rp),
intent(in) :: ocean_depth
216 real(
rp),
intent(inout) :: ocean_temp(oia,oja)
217 real(
rp),
intent(inout) :: ice_temp (oia,oja)
218 real(
rp),
intent(inout) :: ice_mass (oia,oja)
219 real(
rp),
intent(out) :: mass_flux(oia,oja)
220 real(
rp),
intent(out) :: engi_flux(oia,oja)
221 real(
rp),
intent(out) :: mass_supl (oia,oja)
222 real(
rp),
intent(out) :: engi_supl (oia,oja)
225 real(
rp) :: ice_mass_frz
226 real(
rp) :: ice_mass_prev
231 c_w =
cv_water * dwatr * ocean_depth
237 if ( calc_flag(i,j) &
241 ice_mass_frz = min( ice_mass_frz, dwatr * ocean_depth )
244 ice_mass_prev = ice_mass(i,j)
245 ice_mass(i,j) = ice_mass(i,j) + ice_mass_frz
246 ice_mass(i,j) = min( ice_mass(i,j), ocean_phy_ice_mass_limit )
247 ice_mass_frz = ice_mass(i,j) - ice_mass_prev
250 ice_temp(i,j) = ice_temp(i,j) &
254 ocean_temp(i,j) = ocean_temp(i,j) &
258 mass_flux(i,j) = ice_mass_frz
260 mass_supl(i,j) = ice_mass_frz
261 engi_supl(i,j) = ice_mass_frz *
cv_water * ocean_temp(i,j)
263 mass_flux(i,j) = 0.0_rp
264 engi_flux(i,j) = 0.0_rp
265 mass_supl(i,j) = 0.0_rp
266 engi_supl(i,j) = 0.0_rp
300 file_external_input_update
303 integer,
intent(in) :: oia, ois, oie
304 integer,
intent(in) :: oja, ojs, oje
305 real(
rp),
intent(in) :: iflx_water (oia,oja)
306 real(
rp),
intent(in) :: iflx_hbalance(oia,oja)
307 real(
rp),
intent(in) :: subsfc_temp (oia,oja)
308 real(
rp),
intent(in) :: tc_dz (oia,oja)
309 real(
rp),
intent(in) :: ice_temp (oia,oja)
310 real(
rp),
intent(in) :: ice_mass (oia,oja)
311 real(
rp),
intent(in) :: ice_frac (oia,oja)
312 logical,
intent(in) :: calc_flag (oia,oja)
313 real(
dp),
intent(in) :: dt
314 real(
rp),
intent(out) :: ice_temp_t (oia,oja)
315 real(
rp),
intent(out) :: ice_mass_t (oia,oja)
316 real(
rp),
intent(out) :: sflx_g (oia,oja)
317 real(
rp),
intent(out) :: sflx_water (oia,oja)
318 real(
rp),
intent(out) :: sflx_rhoe (oia,oja)
320 real(
rp) :: ice_mass_new
321 real(
rp) :: ice_temp_new
322 real(
rp) :: mass_budget
323 real(
rp) :: heat_budget
333 log_progress(*)
'ocean / physics / seaice'
335 dt_rp = real(dt,kind=
rp)
342 if ( calc_flag(i,j) )
then
345 dm = iflx_water(i,j) * ice_frac(i,j) * dt_rp
346 ice_mass_new = ice_mass(i,j) + dm
348 if ( ice_mass_new > 0.0_rp )
then
350 g = ( subsfc_temp(i,j) - ice_temp(i,j) ) * tc_dz(i,j)
351 de = ( iflx_hbalance(i,j) + g ) * ice_frac(i,j) * dt_rp
352 ice_temp_new = ice_temp(i,j) &
353 + ( de - (
cv_ice * ice_temp(i,j) -
lhf ) * dm ) / (
cv_ice * ice_mass_new )
358 m_mlt = min( max( m_mlt, 0.0_rp ), ice_mass_new )
360 ice_mass_new = ice_mass_new - m_mlt
361 ice_temp_new = ice_temp_new &
363 / (
cv_ice * ice_mass_new )
366 mass_budget = m_mlt / dt_rp
368 sflx_g(i,j) = - g * ice_frac(i,j)
369 sflx_water(i,j) = mass_budget
373 ice_mass_new = 0.0_rp
376 sflx_rhoe(i,j) =
cv_water * subsfc_temp(i,j) * ice_mass_new / dt_rp
377 sflx_g(i,j) = (
cv_ice * ice_temp(i,j) -
lhf ) * ice_mass(i,j) &
378 - sflx_rhoe(i,j) + iflx_hbalance(i,j) * ice_frac(i,j)
379 sflx_water(i,j) = ice_mass_new
383 ice_mass_t(i,j) = ( ice_mass_new - ice_mass(i,j) ) / dt_rp
384 ice_temp_t(i,j) = ( ice_temp_new - ice_temp(i,j) ) / dt_rp
388 sflx_water(i,j) = 0.0_rp
389 sflx_rhoe(i,j) = 0.0_rp
390 ice_mass_t(i,j) = 0.0_rp
391 ice_temp_t(i,j) = 0.0_rp