SCALE-RM
Functions/Subroutines | Variables
scale_ocean_phy_ice_simple Module Reference

module ocean / physics / ice / simple More...

Functions/Subroutines

subroutine, public ocean_phy_ice_setup
 
subroutine, public ocean_phy_ice_fraction (OIA, OIS, OIE, OJA, OJS, OJE, ICE_MASS, ICE_FRAC)
 
subroutine, public ocean_phy_ice_adjustment (OIA, OIS, OIE, OJA, OJS, OJE, calc_flag, OCEAN_DEPTH, OCEAN_TEMP, ICE_TEMP, ICE_MASS)
 
subroutine, public ocean_phy_ice_simple (OIA, OIS, OIE, OJA, OJS, OJE, sflx_QV, sflx_rain, sflx_snow, sflx_hbalance, subsfc_temp, TC_dz, ICE_TEMP, ICE_MASS, calc_flag, dt, ICE_TEMP_t, ICE_MASS_t, sflx_G, sflx_water, sflx_ice)
 Slab ocean model. More...
 

Variables

real(rp), public ocean_phy_ice_freezetemp = 271.35_RP
 
real(rp), public ocean_phy_ice_density = 1000.0_RP
 

Detailed Description

module ocean / physics / ice / simple

Description
ocean common module
Author
Team SCALE
NAMELIST
  • PARAM_OCEAN_PHY_ICE
    nametypedefault valuecomment
    OCEAN_PHY_ICE_DENSITY real(RP) 1000.0_RP density of sea ice [kg/m3]
    OCEAN_PHY_ICE_MASS_CRITICAL real(RP) 1600.0_RP ice amount for fraction = 1 [kg/m2]
    OCEAN_PHY_ICE_MASS_LIMIT real(RP) 50000.0_RP maximum ice amount [kg/m2]
    OCEAN_PHY_ICE_FRACTION_LIMIT real(RP) 1.0_RP maximum ice fraction [1]
    OCEAN_PHY_ICE_DT_MAX real(RP) 5.E-2_RP maximum delta ice temperature [K/s]

History Output
No history output

Function/Subroutine Documentation

◆ ocean_phy_ice_setup()

subroutine, public scale_ocean_phy_ice_simple::ocean_phy_ice_setup ( )

Definition at line 60 of file scale_ocean_phy_ice_simple.F90.

References scale_calendar::calendar_unit2sec(), scale_const::const_undef, scale_file_external_input::file_external_input_file_limit, scale_file_external_input::file_external_input_regist(), scale_io::io_fid_conf, ocean_phy_ice_density, and scale_prc::prc_abort().

Referenced by mod_ocean_driver::ocean_driver_setup().

60  use scale_prc, only: &
61  prc_abort
62  use scale_const, only: &
63  undef => const_undef
64  use scale_calendar, only: &
66  use scale_file_external_input, only: &
69  implicit none
70 
71  real(DP) :: ocean_phy_ice_nudging_tau = 0.0_dp ! Relaxation time
72  character(len=H_SHORT) :: ocean_phy_ice_nudging_tau_unit = "SEC"
73  character(len=H_LONG) :: ocean_phy_ice_nudging_basename(file_external_input_file_limit) = ''
74  logical :: ocean_phy_ice_nudging_enable_periodic_year = .false.
75  logical :: ocean_phy_ice_nudging_enable_periodic_month = .false.
76  logical :: ocean_phy_ice_nudging_enable_periodic_day = .false.
77  integer :: ocean_phy_ice_nudging_step_fixed = 0
78  real(RP) :: ocean_phy_ice_nudging_offset = 0.0_rp
79  real(RP) :: ocean_phy_ice_nudging_defval != UNDEF
80  logical :: ocean_phy_ice_nudging_check_coordinates = .true.
81  integer :: ocean_phy_ice_nudging_step_limit = 0
82 
83  namelist / param_ocean_phy_ice / &
84  ocean_phy_ice_density, &
85  ocean_phy_ice_mass_critical, &
86  ocean_phy_ice_mass_limit, &
87  ocean_phy_ice_fraction_limit, &
88  ocean_phy_ice_dt_max!, &
89 ! OCEAN_PHY_ICE_nudging, &
90 ! OCEAN_PHY_ICE_nudging_tau, &
91 ! OCEAN_PHY_ICE_nudging_tau_unit, &
92 ! OCEAN_PHY_ICE_nudging_basename, &
93 ! OCEAN_PHY_ICE_nudging_enable_periodic_year, &
94 ! OCEAN_PHY_ICE_nudging_enable_periodic_month, &
95 ! OCEAN_PHY_ICE_nudging_enable_periodic_day, &
96 ! OCEAN_PHY_ICE_nudging_step_fixed, &
97 ! OCEAN_PHY_ICE_nudging_offset, &
98 ! OCEAN_PHY_ICE_nudging_defval, &
99 ! OCEAN_PHY_ICE_nudging_check_coordinates, &
100 ! OCEAN_PHY_ICE_nudging_step_limit
101 
102  integer :: ierr
103  !---------------------------------------------------------------------------
104 
105  log_newline
106  log_info("OCEAN_PHY_ICE_setup",*) 'Setup'
107 
108  ocean_phy_ice_nudging_defval = undef
109 
110  !--- read namelist
111  rewind(io_fid_conf)
112  read(io_fid_conf,nml=param_ocean_phy_ice,iostat=ierr)
113  if( ierr < 0 ) then !--- missing
114  log_info("OCEAN_PHY_ICE_setup",*) 'Not found namelist. Default used.'
115  elseif( ierr > 0 ) then !--- fatal error
116  log_error("OCEAN_PHY_ICE_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_PHY_ICE. Check!'
117  call prc_abort
118  endif
119  log_nml(param_ocean_phy_ice)
120 
121  log_newline
122  log_info("OCEAN_PHY_ICE_setup",*) 'Ice amount for frac. = 1 [kg/m2] : ', ocean_phy_ice_mass_critical
123  if ( ocean_phy_ice_nudging ) then
124  call calendar_unit2sec( ocean_phy_ice_nudging_tausec, ocean_phy_ice_nudging_tau, ocean_phy_ice_nudging_tau_unit )
125 
126  log_info("OCEAN_PHY_ICE_setup",*) 'Use nudging for sea ice fraction : ON'
127  log_info("OCEAN_PHY_ICE_setup",*) 'Relaxation time Tau [sec] : ', ocean_phy_ice_nudging_tausec
128 
129  if ( ocean_phy_ice_nudging_tausec == 0.0_rp ) then
130  ocean_phy_ice_offline_mode = .true.
131  log_info("OCEAN_PHY_ICE_setup",*) 'Tau=0 means that sea ice is completely replaced by the external data.'
132  endif
133 
134  if ( ocean_phy_ice_nudging_basename(1) == '' ) then
135  log_error("OCEAN_PHY_ICE_setup",*) 'OCEAN_PHY_ICE_nudging_basename is necessary. STOP'
136  call prc_abort
137  endif
138  else
139  log_info("OCEAN_PHY_ICE_setup",*) 'Use nudging for sea ice fraction : OFF'
140  endif
141 
142  if ( ocean_phy_ice_nudging ) then
143  call file_external_input_regist( ocean_phy_ice_nudging_basename(:), & ! [IN]
144  'OCEAN_ICE_FRAC', & ! [IN]
145  'XY', & ! [IN]
146  ocean_phy_ice_nudging_enable_periodic_year, & ! [IN]
147  ocean_phy_ice_nudging_enable_periodic_month, & ! [IN]
148  ocean_phy_ice_nudging_enable_periodic_day, & ! [IN]
149  ocean_phy_ice_nudging_step_fixed, & ! [IN]
150  ocean_phy_ice_nudging_offset, & ! [IN]
151  ocean_phy_ice_nudging_defval, & ! [IN]
152  ocean_phy_ice_nudging_check_coordinates, & ! [IN]
153  ocean_phy_ice_nudging_step_limit ) ! [IN]
154  endif
155 
156  return
subroutine, public calendar_unit2sec(second, value, unit)
Convert several units to second.
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
module file / external_input
subroutine, public file_external_input_regist(basename, varname, axistype, enable_periodic_year, enable_periodic_month, enable_periodic_day, step_fixed, offset, defval, check_coordinates, step_limit, exist)
Regist data.
real(rp), public const_undef
Definition: scale_const.F90:41
integer, parameter, public file_external_input_file_limit
limit of file (for one item)
module PROCESS
Definition: scale_prc.F90:11
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
module CONSTANT
Definition: scale_const.F90:11
module CALENDAR
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ocean_phy_ice_fraction()

subroutine, public scale_ocean_phy_ice_simple::ocean_phy_ice_fraction ( integer, intent(in)  OIA,
integer, intent(in)  OIS,
integer, intent(in)  OIE,
integer, intent(in)  OJA,
integer, intent(in)  OJS,
integer, intent(in)  OJE,
real(rp), dimension(oia,oja), intent(in)  ICE_MASS,
real(rp), dimension(oia,oja), intent(out)  ICE_FRAC 
)

Definition at line 165 of file scale_ocean_phy_ice_simple.F90.

Referenced by mod_ocean_driver::ocean_driver_update(), and mod_ocean_vars::ocean_vars_restart_read().

165  implicit none
166 
167  integer, intent(in) :: oia, ois, oie
168  integer, intent(in) :: oja, ojs, oje
169  real(RP), intent(in) :: ice_mass(oia,oja) ! sea ice amount [kg/m2]
170  real(RP), intent(out) :: ice_frac(oia,oja) ! sea ice area fraction [1]
171 
172  integer :: i, j
173  !---------------------------------------------------------------------------
174 
175  do j = ojs, oje
176  do i = ois, oie
177  ice_frac(i,j) = ice_mass(i,j) / ocean_phy_ice_mass_critical
178 
179  ice_frac(i,j) = min( sqrt( max( ice_frac(i,j), 0.0_rp ) ), ocean_phy_ice_fraction_limit )
180  enddo
181  enddo
182 
183  return
Here is the caller graph for this function:

◆ ocean_phy_ice_adjustment()

subroutine, public scale_ocean_phy_ice_simple::ocean_phy_ice_adjustment ( integer, intent(in)  OIA,
integer, intent(in)  OIS,
integer, intent(in)  OIE,
integer, intent(in)  OJA,
integer, intent(in)  OJS,
integer, intent(in)  OJE,
logical, dimension (oia,oja), intent(in)  calc_flag,
real(rp), intent(in)  OCEAN_DEPTH,
real(rp), dimension(oia,oja), intent(inout)  OCEAN_TEMP,
real(rp), dimension (oia,oja), intent(inout)  ICE_TEMP,
real(rp), dimension (oia,oja), intent(inout)  ICE_MASS 
)

Definition at line 195 of file scale_ocean_phy_ice_simple.F90.

References scale_const::const_ci, scale_const::const_cl, scale_const::const_dwatr, scale_const::const_emelt, and ocean_phy_ice_freezetemp.

Referenced by mod_ocean_driver::ocean_driver_update().

195  use scale_const, only: &
196  cl => const_cl, &
197  ci => const_ci, &
198  emelt => const_emelt, &
199  dwatr => const_dwatr
200  implicit none
201 
202  integer, intent(in) :: oia, ois, oie
203  integer, intent(in) :: oja, ojs, oje
204  logical, intent(in) :: calc_flag (oia,oja) ! to decide calculate or not
205  real(RP), intent(in) :: ocean_depth ! depth of the first layer of the ocean
206  real(RP), intent(inout) :: ocean_temp(oia,oja) ! ocean temperature [K]
207  real(RP), intent(inout) :: ice_temp (oia,oja) ! sea ice temperature [K]
208  real(RP), intent(inout) :: ice_mass (oia,oja) ! sea ice amount [kg/m2]
209 
210  real(RP) :: ice_mass_diff
211  real(RP) :: ice_mass_prev
212  real(RP) :: factor
213  real(RP) :: sw
214 
215  integer :: i, j
216  !---------------------------------------------------------------------------
217 
218  !$omp parallel do &
219  !$omp private(ICE_MASS_diff,ICE_MASS_prev,factor,sw)
220  do j = ojs, oje
221  do i = ois, oie
222  sw = 0.5_rp + sign(0.5_rp, ocean_temp(i,j) - ocean_phy_ice_freezetemp) ! 1: melt, 0: freeze
223  factor = cl * dwatr * ocean_depth &
224  / ( emelt + sw * ci * ( ocean_phy_ice_freezetemp - ice_temp(i,j) ) )
225 
226  if ( calc_flag(i,j) ) then
227  ! update ice mass
228  ice_mass_diff = ( ocean_phy_ice_freezetemp - ocean_temp(i,j) ) * factor ! [kg/m2/s], positive is freezing
229  ice_mass_prev = ice_mass(i,j)
230  ice_mass(i,j) = min( max( ice_mass(i,j) + ice_mass_diff, 0.0_rp ), ocean_phy_ice_mass_limit ) ! update mass w/ limiter
231  ice_mass_diff = ice_mass(i,j) - ice_mass_prev
232 
233  ! update ocean temperature
234  ocean_temp(i,j) = ocean_temp(i,j) + ice_mass_diff / factor
235 
236  ! update ice temperature
237  if ( ice_mass(i,j) > 0.0_rp ) then
238  if ( ice_mass_diff > 0.0_rp ) then ! when ice increases, new ice have the temperature at freezing point (when the limiter does not work)
239  ice_temp(i,j) = ( ice_temp(i,j) * ice_mass_prev &
240  + ocean_phy_ice_freezetemp * ice_mass_diff &
241  + ( ocean_phy_ice_freezetemp - ocean_temp(i,j) ) * ice_mass_diff * cl / ci & ! due to the limiter
242  ) / ice_mass(i,j)
243  endif
244  else ! fill value
245  ice_temp(i,j) = ocean_phy_ice_freezetemp
246  endif
247  endif
248  enddo
249  enddo
250 
251  return
real(rp), parameter, public const_ci
specific heat (ice) [J/kg/K]
Definition: scale_const.F90:67
real(rp), parameter, public const_dwatr
density of water [kg/m3]
Definition: scale_const.F90:82
real(rp), parameter, public const_cl
specific heat (liquid water) [J/kg/K]
Definition: scale_const.F90:66
module CONSTANT
Definition: scale_const.F90:11
real(rp), parameter, public const_emelt
Definition: scale_const.F90:72
Here is the caller graph for this function:

◆ ocean_phy_ice_simple()

subroutine, public scale_ocean_phy_ice_simple::ocean_phy_ice_simple ( integer, intent(in)  OIA,
integer, intent(in)  OIS,
integer, intent(in)  OIE,
integer, intent(in)  OJA,
integer, intent(in)  OJS,
integer, intent(in)  OJE,
real(rp), dimension (oia,oja), intent(in)  sflx_QV,
real(rp), dimension (oia,oja), intent(in)  sflx_rain,
real(rp), dimension (oia,oja), intent(in)  sflx_snow,
real(rp), dimension(oia,oja), intent(in)  sflx_hbalance,
real(rp), dimension (oia,oja), intent(in)  subsfc_temp,
real(rp), dimension (oia,oja), intent(in)  TC_dz,
real(rp), dimension (oia,oja), intent(in)  ICE_TEMP,
real(rp), dimension (oia,oja), intent(in)  ICE_MASS,
logical, dimension (oia,oja), intent(in)  calc_flag,
real(dp), intent(in)  dt,
real(rp), dimension (oia,oja), intent(out)  ICE_TEMP_t,
real(rp), dimension (oia,oja), intent(out)  ICE_MASS_t,
real(rp), dimension (oia,oja), intent(out)  sflx_G,
real(rp), dimension (oia,oja), intent(out)  sflx_water,
real(rp), dimension (oia,oja), intent(out)  sflx_ice 
)

Slab ocean model.

Definition at line 274 of file scale_ocean_phy_ice_simple.F90.

References scale_const::const_ci, scale_const::const_emelt, ocean_phy_ice_freezetemp, and scale_prc::prc_abort().

Referenced by mod_ocean_driver::ocean_driver_calc_tendency().

274  use scale_prc, only: &
275  prc_abort
276  use scale_const, only: &
277  const_ci, &
279  use scale_file_external_input, only: &
280  file_external_input_update
281  implicit none
282 
283  integer, intent(in) :: oia, ois, oie
284  integer, intent(in) :: oja, ojs, oje
285  real(RP), intent(in) :: sflx_qv (oia,oja) ! water vapor flux [kg/m2/s]
286  real(RP), intent(in) :: sflx_rain (oia,oja) ! rain flux [kg/m2/s]
287  real(RP), intent(in) :: sflx_snow (oia,oja) ! snow flux [kg/m2/s]
288  real(RP), intent(in) :: sflx_hbalance(oia,oja) ! surface heat flux balance [J/m2/s] (negative)
289  real(RP), intent(in) :: subsfc_temp (oia,oja) ! subsurface temperature [K]
290  real(RP), intent(in) :: tc_dz (oia,oja) ! Thermal conductance [K/m]
291  real(RP), intent(in) :: ice_temp (oia,oja) ! sea ice temperature [K]
292  real(RP), intent(in) :: ice_mass (oia,oja) ! sea ice amount [kg/m2]
293  logical, intent(in) :: calc_flag (oia,oja) ! to decide calculate or not
294  real(DP), intent(in) :: dt
295  real(RP), intent(out) :: ice_temp_t (oia,oja) ! tendency of sea ice temperature [K/s]
296  real(RP), intent(out) :: ice_mass_t (oia,oja) ! tendency of sea ice amount [kg/m2/s]
297  real(RP), intent(out) :: sflx_g (oia,oja) ! heat flux from sea ice to subsurface
298  real(RP), intent(out) :: sflx_water (oia,oja) ! liquid water flux from sea ice to subsurface
299  real(RP), intent(out) :: sflx_ice (oia,oja) ! ice water flux from sea ice to subsurface
300 
301  real(RP) :: mass_budget ! [kg/m2/s]
302  real(RP) :: ice_mass_new ! [kg/m2]
303  real(RP) :: ice_mass_new2 ! [kg/m2]
304  real(RP) :: heat_budget ! [J/m2/s]
305  real(RP) :: heat_budget_new ! [J/m2/s]
306  real(RP) :: gflx ! [J/m2/s]
307  real(RP) :: ice_temp_new ! [K]
308  real(RP) :: heatcapacity ! [J/m2/K]
309  real(RP) :: heating ! [J/m2/s]
310  real(RP) :: cooling ! [J/m2/s]
311  real(RP) :: sflx_melt ! [kg/m2/s]
312  real(RP) :: dt_rp
313 
314  integer :: i, j
315  !---------------------------------------------------------------------------
316 
317  log_progress(*) 'ocean / physics / seaice'
318 
319  dt_rp = real(dt,kind=rp)
320 
321  !$omp parallel do &
322  !$omp private(mass_budget,ICE_MASS_new,ICE_MASS_new2, &
323  !$omp heat_budget,heat_budget_new,gflx,ICE_TEMP_new,heatcapacity,heating,cooling, &
324  !$omp sflx_melt)
325  do j = ojs, oje
326  do i = ois, oie
327  if ( calc_flag(i,j) ) then
328  ! mass balance
329  mass_budget = -sflx_qv(i,j) + sflx_rain(i,j) + sflx_snow(i,j)
330  ice_mass_new = max( ice_mass(i,j) + mass_budget * dt_rp, 0.0_rp )
331  mass_budget = mass_budget - ( ice_mass_new - ice_mass(i,j) ) / dt_rp ! residual
332 
333  ! heat balance
334  gflx = ( subsfc_temp(i,j) - ice_temp(i,j) ) * tc_dz(i,j)
335  heat_budget = sflx_hbalance(i,j) & ! SWD - SWU + LWD - LWU - SH - LH
336  + gflx & ! heat flux from ocean
337  + sflx_rain(i,j) * const_emelt ! rain freezing
338 
339  ice_temp_new = ice_temp(i,j)
340  heatcapacity = const_ci * ice_mass_new
341 
342  ! heating ice
343  if ( heat_budget > 0.0_rp .AND. ice_mass_new > 0.0_rp ) then
344  heating = max( ocean_phy_ice_freezetemp - ice_temp(i,j), 0.0_rp ) / dt_rp * heatcapacity
345  heat_budget_new = max( heat_budget - heating, 0.0_rp )
346  ice_temp_new = ice_temp(i,j) + ( heat_budget - heat_budget_new ) / heatcapacity * dt_rp
347  heat_budget = heat_budget_new
348  endif
349 
350  ! cooling ice
351  if ( heat_budget < 0.0_rp .AND. ice_mass_new > 0.0_rp ) then
352  !! cooling limiter: tiny ice does not cooled faster than thermal conductance of ice, residual heat flux goes ocean
353  !ICE_TEMP_new = max( ICE_TEMP(i,j) + heat_budget / heatcapacity * dt_RP, 0.0_RP )
354  !cooling = max( heat_budget, ( ICE_TEMP_new - ICE_TEMP(i,j) ) * TC_dZ(i,j) )
355 
356  ! cooling limiter: tiny ice does not cooled faster than the limit (-0.05K/s), residual heat flux goes ocean
357  cooling = max( heat_budget, -ocean_phy_ice_dt_max * heatcapacity )
358 
359  ice_temp_new = ice_temp(i,j) + cooling / heatcapacity * dt_rp
360  heat_budget = heat_budget - cooling
361  endif
362 
363  ! melting ice
364  sflx_melt = max( heat_budget / const_emelt, 0.0_rp ) ! only for positive heat flux
365  ice_mass_new2 = max( ice_mass_new - sflx_melt * dt_rp, 0.0_rp )
366  sflx_melt = ( ice_mass_new - ice_mass_new2 ) / dt_rp
367  heat_budget = heat_budget - sflx_melt * const_emelt
368  mass_budget = mass_budget + sflx_melt
369 
370  ! ice to ocean flux
371  sflx_g(i,j) = heat_budget - gflx
372  sflx_water(i,j) = mass_budget
373  sflx_ice(i,j) = 0.0_rp
374 
375  ice_mass_t(i,j) = ( ice_mass_new2 - ice_mass(i,j) ) / dt_rp
376  ice_temp_t(i,j) = ( ice_temp_new - ice_temp(i,j) ) / dt_rp
377  else
378  sflx_g(i,j) = 0.0_rp
379  sflx_water(i,j) = 0.0_rp
380  sflx_ice(i,j) = 0.0_rp
381  ice_mass_t(i,j) = 0.0_rp
382  ice_temp_t(i,j) = 0.0_rp
383  endif
384  enddo
385  enddo
386 
387  return
real(rp), parameter, public const_ci
specific heat (ice) [J/kg/K]
Definition: scale_const.F90:67
module file / external_input
module PROCESS
Definition: scale_prc.F90:11
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
module CONSTANT
Definition: scale_const.F90:11
real(rp), parameter, public const_emelt
Definition: scale_const.F90:72
integer, parameter, public rp
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ocean_phy_ice_freezetemp

real(rp), public scale_ocean_phy_ice_simple::ocean_phy_ice_freezetemp = 271.35_RP

Definition at line 44 of file scale_ocean_phy_ice_simple.F90.

Referenced by ocean_phy_ice_adjustment(), ocean_phy_ice_simple(), mod_ocean_vars::ocean_vars_restart_read(), and mod_realinput::realinput_surface().

44  real(RP), public :: ocean_phy_ice_freezetemp = 271.35_rp ! freezing temperature of sea ice [K]

◆ ocean_phy_ice_density

real(rp), public scale_ocean_phy_ice_simple::ocean_phy_ice_density = 1000.0_RP

Definition at line 45 of file scale_ocean_phy_ice_simple.F90.

Referenced by ocean_phy_ice_setup(), and scale_ocean_phy_tc::ocean_phy_tc_seaice().

45  real(RP), public :: ocean_phy_ice_density = 1000.0_rp ! density of sea ice [kg/m3]