SCALE-RM
scale_ocean_phy_roughness.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  !
32 
33  !-----------------------------------------------------------------------------
34  !
35  !++ Public parameters & variables
36  !
37  !-----------------------------------------------------------------------------
38  !
39  !++ Private procedure
40  !
41  !-----------------------------------------------------------------------------
42  !
43  !++ Private parameters & variables
44  !
45  real(rp), public :: ocean_phy_roughness_visck = 1.5e-5_rp ! kinematic viscosity [m2/s]
46  real(rp), public :: ocean_phy_roughness_ustar_min = 1.0e-3_rp ! minimum friction velocity [m/s]
47  real(rp), public :: ocean_phy_roughness_z0m_min = 1.0e-5_rp ! minimum roughness length for momentum [m]
48  real(rp), public :: ocean_phy_roughness_z0h_min = 1.0e-7_rp ! minimum roughness length for heat [m]
49  real(rp), public :: ocean_phy_roughness_z0e_min = 1.0e-7_rp ! minimum roughness length for moisture [m]
50 
51  real(rp), public :: ocean_phy_roughness_z0m = 1.0e-5_rp ! constant roughness length for momentum [m]
52  real(rp), public :: ocean_phy_roughness_z0h = 1.0e-5_rp ! constant roughness length for heat [m]
53  real(rp), public :: ocean_phy_roughness_z0e = 1.0e-5_rp ! constant roughness length for moisture [m]
54 
55  real(rp), public :: ocean_phy_roughness_seaice_z0m = 2.0e-2_rp ! seaice roughness length for momentum [m]
56  real(rp), public :: ocean_phy_roughness_seaice_z0h = 2.0e-3_rp ! seaice roughness length for heat [m]
57  real(rp), public :: ocean_phy_roughness_seaice_z0e = 2.0e-3_rp ! seaice roughness length for moisture [m]
58 
59  !-----------------------------------------------------------------------------
60 contains
61  !-----------------------------------------------------------------------------
62  subroutine ocean_phy_roughness_setup
63  use scale_prc, only: &
64  prc_abort
65  implicit none
66 
67  namelist / param_ocean_phy_roughness / &
73 
74  integer :: ierr
75  !---------------------------------------------------------------------------
76 
77  log_newline
78  log_info("OCEAN_PHY_ROUGHNESS_setup",*) 'Setup'
79 
80  !--- read namelist
81  rewind(io_fid_conf)
82  read(io_fid_conf,nml=param_ocean_phy_roughness,iostat=ierr)
83  if( ierr < 0 ) then !--- missing
84  log_info("OCEAN_PHY_ROUGHNESS_setup",*) 'Not found namelist. Default used.'
85  elseif( ierr > 0 ) then !--- fatal error
86  log_error("OCEAN_PHY_ROUGHNESS_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_PHY_ROUGHNESS. Check!'
87  call prc_abort
88  endif
89  log_nml(param_ocean_phy_roughness)
90 
91  return
92  end subroutine ocean_phy_roughness_setup
93 
94  !-----------------------------------------------------------------------------
96  use scale_prc, only: &
97  prc_abort
98  implicit none
99 
100  namelist / param_ocean_phy_roughness_const / &
104 
105  integer :: ierr
106  !---------------------------------------------------------------------------
107 
108  log_newline
109  log_info("OCEAN_PHY_ROUGHNESS_const_setup",*) 'Setup'
110 
111  !--- read namelist
112  rewind(io_fid_conf)
113  read(io_fid_conf,nml=param_ocean_phy_roughness_const,iostat=ierr)
114  if( ierr < 0 ) then !--- missing
115  log_info("OCEAN_PHY_ROUGHNESS_const_setup",*) 'Not found namelist. Default used.'
116  elseif( ierr > 0 ) then !--- fatal error
117  log_error("OCEAN_PHY_ROUGHNESS_const_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_PHY_ROUGHNESS_const. Check!'
118  call prc_abort
119  endif
120  log_nml(param_ocean_phy_roughness_const)
121 
122  return
123  end subroutine ocean_phy_roughness_const_setup
124 
125  !-----------------------------------------------------------------------------
127  use scale_prc, only: &
128  prc_abort
129  implicit none
130 
131  namelist / param_ocean_phy_roughness_seaice / &
135 
136  integer :: ierr
137  !---------------------------------------------------------------------------
138 
139  log_newline
140  log_info("OCEAN_PHY_ROUGHNESS_seaice_setup",*) 'Setup'
141 
142  !--- read namelist
143  rewind(io_fid_conf)
144  read(io_fid_conf,nml=param_ocean_phy_roughness_seaice,iostat=ierr)
145  if( ierr < 0 ) then !--- missing
146  log_info("OCEAN_PHY_ROUGHNESS_seaice_setup",*) 'Not found namelist. Default used.'
147  elseif( ierr > 0 ) then !--- fatal error
148  log_error("OCEAN_PHY_ROUGHNESS_seaice_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_PHY_ROUGHNESS_seaice. Check!'
149  call prc_abort
150  endif
151  log_nml(param_ocean_phy_roughness_seaice)
152 
153  return
154  end subroutine ocean_phy_roughness_seaice_setup
155 
156  !-----------------------------------------------------------------------------
157  subroutine ocean_phy_roughness_const( &
158  OIA, OIS, OIE, &
159  OJA, OJS, OJE, &
160  Z0M, Z0H, Z0E )
161  implicit none
162 
163  integer, intent(in) :: oia, ois, oie
164  integer, intent(in) :: oja, ojs, oje
165  real(rp), intent(out) :: z0m(oia,oja) ! roughness length for momentum [m]
166  real(rp), intent(out) :: z0h(oia,oja) ! roughness length for heat [m]
167  real(rp), intent(out) :: z0e(oia,oja) ! roughness length for vapor [m]
168 
169  integer :: i, j
170  !---------------------------------------------------------------------------
171 
172  do j = ojs, oje
173  do i = ois, oie
177  enddo
178  enddo
179 
180  return
181  end subroutine ocean_phy_roughness_const
182 
183  !-----------------------------------------------------------------------------
184  subroutine ocean_phy_roughness_seaice( &
185  OIA, OIS, OIE, &
186  OJA, OJS, OJE, &
187  Z0M, Z0H, Z0E )
188  implicit none
189 
190  integer, intent(in) :: oia, ois, oie
191  integer, intent(in) :: oja, ojs, oje
192  real(rp), intent(out) :: z0m(oia,oja) ! roughness length for momentum [m]
193  real(rp), intent(out) :: z0h(oia,oja) ! roughness length for heat [m]
194  real(rp), intent(out) :: z0e(oia,oja) ! roughness length for vapor [m]
195 
196  integer :: i, j
197  !---------------------------------------------------------------------------
198 
199  do j = ojs, oje
200  do i = ois, oie
204  enddo
205  enddo
206 
207  return
208  end subroutine ocean_phy_roughness_seaice
209 
210 end module scale_ocean_phy_roughness
scale_ocean_phy_roughness::ocean_phy_roughness_seaice
subroutine, public ocean_phy_roughness_seaice(OIA, OIS, OIE, OJA, OJS, OJE, Z0M, Z0H, Z0E)
Definition: scale_ocean_phy_roughness.F90:188
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_ocean_phy_roughness::ocean_phy_roughness_z0h
real(rp), public ocean_phy_roughness_z0h
Definition: scale_ocean_phy_roughness.F90:52
scale_ocean_phy_roughness::ocean_phy_roughness_z0m
real(rp), public ocean_phy_roughness_z0m
Definition: scale_ocean_phy_roughness.F90:51
scale_ocean_phy_roughness::ocean_phy_roughness_setup
subroutine, public ocean_phy_roughness_setup
Definition: scale_ocean_phy_roughness.F90:63
scale_ocean_phy_roughness::ocean_phy_roughness_z0m_min
real(rp), public ocean_phy_roughness_z0m_min
Definition: scale_ocean_phy_roughness.F90:47
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_ocean_phy_roughness::ocean_phy_roughness_ustar_min
real(rp), public ocean_phy_roughness_ustar_min
Definition: scale_ocean_phy_roughness.F90:46
scale_ocean_phy_roughness::ocean_phy_roughness_const
subroutine, public ocean_phy_roughness_const(OIA, OIS, OIE, OJA, OJS, OJE, Z0M, Z0H, Z0E)
Definition: scale_ocean_phy_roughness.F90:161
scale_ocean_phy_roughness::ocean_phy_roughness_visck
real(rp), public ocean_phy_roughness_visck
Definition: scale_ocean_phy_roughness.F90:45
scale_ocean_phy_roughness::ocean_phy_roughness_z0h_min
real(rp), public ocean_phy_roughness_z0h_min
Definition: scale_ocean_phy_roughness.F90:48
scale_ocean_phy_roughness::ocean_phy_roughness_z0e
real(rp), public ocean_phy_roughness_z0e
Definition: scale_ocean_phy_roughness.F90:53
scale_ocean_phy_roughness::ocean_phy_roughness_seaice_z0m
real(rp), public ocean_phy_roughness_seaice_z0m
Definition: scale_ocean_phy_roughness.F90:55
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_precision::rp
integer, parameter, public rp
Definition: scale_precision.F90:41
scale_ocean_phy_roughness::ocean_phy_roughness_seaice_z0h
real(rp), public ocean_phy_roughness_seaice_z0h
Definition: scale_ocean_phy_roughness.F90:56
scale_io
module STDIO
Definition: scale_io.F90:10
scale_prof
module profiler
Definition: scale_prof.F90:11
scale_ocean_phy_roughness
module ocean / physics / surface roughness length
Definition: scale_ocean_phy_roughness.F90:12
scale_ocean_phy_roughness::ocean_phy_roughness_seaice_setup
subroutine, public ocean_phy_roughness_seaice_setup
Definition: scale_ocean_phy_roughness.F90:127
scale_ocean_phy_roughness::ocean_phy_roughness_const_setup
subroutine, public ocean_phy_roughness_const_setup
Definition: scale_ocean_phy_roughness.F90:96
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:56
scale_ocean_phy_roughness::ocean_phy_roughness_z0e_min
real(rp), public ocean_phy_roughness_z0e_min
Definition: scale_ocean_phy_roughness.F90:49
scale_ocean_phy_roughness::ocean_phy_roughness_seaice_z0e
real(rp), public ocean_phy_roughness_seaice_z0e
Definition: scale_ocean_phy_roughness.F90:57