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.
67 file_external_input_regist
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_defval
80 logical :: ocean_phy_ice_nudging_check_coordinates = .true.
81 integer :: ocean_phy_ice_nudging_step_limit = 0
83 namelist / param_ocean_phy_ice / &
85 ocean_phy_ice_mass_critical, &
86 ocean_phy_ice_mass_limit, &
87 ocean_phy_ice_fraction_limit, &
107 log_info(
"OCEAN_PHY_ICE_setup",*)
'Setup'
109 ocean_phy_ice_nudging_defval = undef
113 read(
io_fid_conf,nml=param_ocean_phy_ice,iostat=ierr)
115 log_info(
"OCEAN_PHY_ICE_setup",*)
'Not found namelist. Default used.'
116 elseif( ierr > 0 )
then
117 log_error(
"OCEAN_PHY_ICE_setup",*)
'Not appropriate names in namelist PARAM_OCEAN_PHY_ICE. Check!'
120 log_nml(param_ocean_phy_ice)
123 log_info(
"OCEAN_PHY_ICE_setup",*)
'Ice amount for frac. = 1 [kg/m2] : ', ocean_phy_ice_mass_critical
124 if ( ocean_phy_ice_nudging )
then
125 call calendar_unit2sec( ocean_phy_ice_nudging_tausec, ocean_phy_ice_nudging_tau, ocean_phy_ice_nudging_tau_unit )
127 log_info(
"OCEAN_PHY_ICE_setup",*)
'Use nudging for sea ice fraction : ON'
128 log_info(
"OCEAN_PHY_ICE_setup",*)
'Relaxation time Tau [sec] : ', ocean_phy_ice_nudging_tausec
130 if ( ocean_phy_ice_nudging_tausec == 0.0_rp )
then
131 ocean_phy_ice_offline_mode = .true.
132 log_info(
"OCEAN_PHY_ICE_setup",*)
'Tau=0 means that sea ice is completely replaced by the external data.'
135 if ( ocean_phy_ice_nudging_basename ==
'' )
then
136 log_error(
"OCEAN_PHY_ICE_setup",*)
'OCEAN_PHY_ICE_nudging_basename is necessary. STOP'
140 log_info(
"OCEAN_PHY_ICE_setup",*)
'Use nudging for sea ice fraction : OFF'
143 if ( ocean_phy_ice_nudging )
then
144 call file_external_input_regist( ocean_phy_ice_nudging_basename, &
145 ocean_phy_ice_nudging_basename_add_num, &
146 ocean_phy_ice_nudging_number_of_files, &
149 ocean_phy_ice_nudging_enable_periodic_year, &
150 ocean_phy_ice_nudging_enable_periodic_month, &
151 ocean_phy_ice_nudging_enable_periodic_day, &
152 ocean_phy_ice_nudging_step_fixed, &
153 ocean_phy_ice_nudging_defval, &
154 check_coordinates = ocean_phy_ice_nudging_check_coordinates, &
155 step_limit = ocean_phy_ice_nudging_step_limit )
169 integer,
intent(in) :: oia, ois, oie
170 integer,
intent(in) :: oja, ojs, oje
171 real(
rp),
intent(in) :: ice_mass(oia,oja)
172 real(
rp),
intent(out) :: ice_frac(oia,oja)
181 ice_frac(i,j) = ice_mass(i,j) / ocean_phy_ice_mass_critical
183 ice_frac(i,j) = min( sqrt( max( ice_frac(i,j), 0.0_rp ) ), ocean_phy_ice_fraction_limit )
214 integer,
intent(in) :: oia, ois, oie
215 integer,
intent(in) :: oja, ojs, oje
216 logical,
intent(in) :: calc_flag (oia,oja)
217 real(
rp),
intent(in) :: ocean_depth
218 real(
rp),
intent(inout) :: ocean_temp(oia,oja)
219 real(
rp),
intent(inout) :: ice_temp (oia,oja)
220 real(
rp),
intent(inout) :: ice_mass (oia,oja)
221 real(
rp),
intent(out) :: mass_flux(oia,oja)
222 real(
rp),
intent(out) :: engi_flux(oia,oja)
223 real(
rp),
intent(out) :: mass_supl (oia,oja)
224 real(
rp),
intent(out) :: engi_supl (oia,oja)
227 real(
rp) :: ice_mass_frz
228 real(
rp) :: ice_mass_prev
236 c_w =
cv_water * dwatr * ocean_depth
243 if ( calc_flag(i,j) &
247 ice_mass_frz = min( ice_mass_frz, dwatr * ocean_depth )
250 ice_mass_prev = ice_mass(i,j)
251 ice_mass(i,j) = ice_mass(i,j) + ice_mass_frz
252 ice_mass(i,j) = min( ice_mass(i,j), ocean_phy_ice_mass_limit )
253 ice_mass_frz = ice_mass(i,j) - ice_mass_prev
256 if ( ice_mass(i,j) > eps )
then
257 ice_temp(i,j) = ice_temp(i,j) &
264 if ( c_w -
cv_water * ice_mass_frz > eps )
then
265 ocean_temp(i,j) = ocean_temp(i,j) &
272 mass_flux(i,j) = ice_mass_frz
274 mass_supl(i,j) = ice_mass_frz
275 engi_supl(i,j) = ice_mass_frz *
cv_water * ocean_temp(i,j)
277 mass_flux(i,j) = 0.0_rp
278 engi_flux(i,j) = 0.0_rp
279 mass_supl(i,j) = 0.0_rp
280 engi_supl(i,j) = 0.0_rp
316 file_external_input_update
319 integer,
intent(in) :: oia, ois, oie
320 integer,
intent(in) :: oja, ojs, oje
321 real(
rp),
intent(in) :: iflx_water (oia,oja)
322 real(
rp),
intent(in) :: iflx_hbalance(oia,oja)
323 real(
rp),
intent(in) :: subsfc_temp (oia,oja)
324 real(
rp),
intent(in) :: tc_dz (oia,oja)
325 real(
rp),
intent(in) :: ice_temp (oia,oja)
326 real(
rp),
intent(in) :: ice_mass (oia,oja)
327 real(
rp),
intent(in) :: ice_frac (oia,oja)
328 logical,
intent(in) :: calc_flag (oia,oja)
329 real(
dp),
intent(in) :: dt
330 real(
rp),
intent(out) :: ice_temp_t (oia,oja)
331 real(
rp),
intent(out) :: ice_mass_t (oia,oja)
332 real(
rp),
intent(out) :: sflx_g (oia,oja)
333 real(
rp),
intent(out) :: sflx_water (oia,oja)
334 real(
rp),
intent(out) :: sflx_rhoe (oia,oja)
336 real(
rp) :: ice_mass_new
337 real(
rp) :: ice_temp_new
338 real(
rp) :: mass_budget
339 real(
rp) :: heat_budget
352 log_progress(*)
'ocean / physics / seaice'
354 dt_rp = real(dt,kind=
rp)
362 if ( calc_flag(i,j) )
then
365 dm = iflx_water(i,j) * ice_frac(i,j) * dt_rp
366 ice_mass_new = ice_mass(i,j) + dm
368 if ( ice_mass_new > 0.0_rp )
then
370 g = ( subsfc_temp(i,j) - ice_temp(i,j) ) * tc_dz(i,j)
371 de = ( iflx_hbalance(i,j) + g ) * ice_frac(i,j) * dt_rp
372 ice_temp_new = ice_temp(i,j) &
373 + ( de - (
cv_ice * ice_temp(i,j) -
lhf ) * dm ) / (
cv_ice * ice_mass_new )
378 m_mlt = min( max( m_mlt, 0.0_rp ), ice_mass_new )
380 ice_mass_new = ice_mass_new - m_mlt
381 ice_temp_new = ice_temp_new &
383 / (
cv_ice * ice_mass_new )
386 mass_budget = m_mlt / dt_rp
388 sflx_g(i,j) = - g * ice_frac(i,j)
389 sflx_water(i,j) = mass_budget
393 ice_mass_new = 0.0_rp
396 sflx_rhoe(i,j) =
cv_water * subsfc_temp(i,j) * ice_mass_new / dt_rp
397 sflx_g(i,j) = (
cv_ice * ice_temp(i,j) -
lhf ) * ice_mass(i,j) &
398 - sflx_rhoe(i,j) + iflx_hbalance(i,j) * ice_frac(i,j)
399 sflx_water(i,j) = ice_mass_new
403 ice_mass_t(i,j) = ( ice_mass_new - ice_mass(i,j) ) / dt_rp
404 ice_temp_t(i,j) = ( ice_temp_new - ice_temp(i,j) ) / dt_rp
408 sflx_water(i,j) = 0.0_rp
409 sflx_rhoe(i,j) = 0.0_rp
410 ice_mass_t(i,j) = 0.0_rp
411 ice_temp_t(i,j) = 0.0_rp