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-5_rp ! minimum roughness length for heat [m]
49  real(RP), public :: ocean_phy_roughness_z0e_min = 1.0e-5_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
subroutine, public ocean_phy_roughness_seaice(OIA, OIS, OIE, OJA, OJS, OJE, Z0M, Z0H, Z0E)
subroutine, public ocean_phy_roughness_const(OIA, OIS, OIE, OJA, OJS, OJE, Z0M, Z0H, Z0E)
subroutine, public ocean_phy_roughness_const_setup
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
module PROCESS
Definition: scale_prc.F90:11
subroutine, public ocean_phy_roughness_seaice_setup
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
module profiler
Definition: scale_prof.F90:11
subroutine, public ocean_phy_roughness_setup
module PRECISION
module STDIO
Definition: scale_io.F90:10
module ocean / physics / surface roughness length