SCALE-RM
scale_ocean_phy_tc.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 !-------------------------------------------------------------------------------
11 #include "scalelib.h"
13  !-----------------------------------------------------------------------------
14  !
15  !++ used modules
16  !
17  use scale_precision
18  use scale_io
19  use scale_prof
20  !-----------------------------------------------------------------------------
21  implicit none
22  private
23  !-----------------------------------------------------------------------------
24  !
25  !++ Public procedure
26  !
28  public :: ocean_phy_tc_seaice
29 
30  !-----------------------------------------------------------------------------
31  !
32  !++ Public parameters & variables
33  !
34  !-----------------------------------------------------------------------------
35  !
36  !++ Private procedure
37  !
38  !-----------------------------------------------------------------------------
39  !
40  !++ Private parameters & variables
41  !
42  real(rp), public :: ocean_phy_thermalcond_max = 10.0_rp ! maximum thermal conductivity / depth [J/m2/s/K]
43  real(rp), public :: ocean_phy_thermalcond_seaice = 2.0_rp ! thermal conductivity of sea ice [J/m/s/K]
44 
45  !-----------------------------------------------------------------------------
46 contains
47  !-----------------------------------------------------------------------------
48  subroutine ocean_phy_tc_seaice_setup
49  use scale_prc, only: &
50  prc_abort
51  implicit none
52 
53  namelist / param_ocean_phy_tc_seaice / &
56 
57  integer :: ierr
58  !---------------------------------------------------------------------------
59 
60  log_newline
61  log_info("OCEAN_PHY_TC_seaice_setup",*) 'Setup'
62 
63  !--- read namelist
64  rewind(io_fid_conf)
65  read(io_fid_conf,nml=param_ocean_phy_tc_seaice,iostat=ierr)
66  if( ierr < 0 ) then !--- missing
67  log_info("OCEAN_PHY_TC_seaice_setup",*) 'Not found namelist. Default used.'
68  elseif( ierr > 0 ) then !--- fatal error
69  log_error("OCEAN_PHY_TC_seaice_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_PHY_TC_seaice. Check!'
70  call prc_abort
71  endif
72  log_nml(param_ocean_phy_tc_seaice)
73 
74  return
75  end subroutine ocean_phy_tc_seaice_setup
76 
77  !-----------------------------------------------------------------------------
78  subroutine ocean_phy_tc_seaice( &
79  OIA, OIS, OIE, &
80  OJA, OJS, OJE, &
81  ICE_MASS, &
82  ICE_FRAC, &
83  mask, &
84  TC_dz )
85  use scale_const, only: &
86  eps => const_eps
87  use scale_ocean_phy_ice_simple, only: &
89  implicit none
90 
91  integer, intent(in) :: oia, ois, oie
92  integer, intent(in) :: oja, ojs, oje
93  real(rp), intent(in) :: ice_mass(oia,oja) ! sea ice amount [kg/m2]
94  real(rp), intent(in) :: ice_frac(oia,oja) ! sea ice area fraction [1]
95  logical, intent(in) :: mask (oia,oja)
96  real(rp), intent(out) :: tc_dz (oia,oja) ! thermal conductivity / depth [J/m2/s/K]
97 
98  real(rp) :: ice_depth
99  integer :: i, j
100  !---------------------------------------------------------------------------
101 
102  !$omp parallel do private(ice_depth)
103  do j = ojs, oje
104  do i = ois, oie
105  if ( mask(i,j) ) then
106  ice_depth = ice_mass(i,j) / ocean_phy_ice_density / max(ice_frac(i,j),eps)
107 
108  tc_dz(i,j) = ocean_phy_thermalcond_seaice / max(ice_depth*0.5_rp,eps) ! at the middle point of the layer
109 
110  tc_dz(i,j) = min( tc_dz(i,j), ocean_phy_thermalcond_max )
111  end if
112  enddo
113  enddo
114 
115  return
116  end subroutine ocean_phy_tc_seaice
117 
118 end module scale_ocean_phy_tc
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_ocean_phy_ice_simple
module ocean / physics / ice / simple
Definition: scale_ocean_phy_ice_simple.F90:12
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_ocean_phy_ice_simple::ocean_phy_ice_density
real(rp), public ocean_phy_ice_density
Definition: scale_ocean_phy_ice_simple.F90:45
scale_const::const_eps
real(rp), public const_eps
small number
Definition: scale_const.F90:33
scale_ocean_phy_tc::ocean_phy_tc_seaice_setup
subroutine, public ocean_phy_tc_seaice_setup
Definition: scale_ocean_phy_tc.F90:49
scale_ocean_phy_tc::ocean_phy_thermalcond_max
real(rp), public ocean_phy_thermalcond_max
Definition: scale_ocean_phy_tc.F90:42
scale_ocean_phy_tc::ocean_phy_thermalcond_seaice
real(rp), public ocean_phy_thermalcond_seaice
Definition: scale_ocean_phy_tc.F90:43
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_precision::rp
integer, parameter, public rp
Definition: scale_precision.F90:41
scale_io
module STDIO
Definition: scale_io.F90:10
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_ocean_phy_tc
module ocean / physics / surface thermal conductivity
Definition: scale_ocean_phy_tc.F90:12
scale_prof
module profiler
Definition: scale_prof.F90:11
scale_ocean_phy_tc::ocean_phy_tc_seaice
subroutine, public ocean_phy_tc_seaice(OIA, OIS, OIE, OJA, OJS, OJE, ICE_MASS, ICE_FRAC, mask, TC_dz)
Definition: scale_ocean_phy_tc.F90:85
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:56