SCALE-RM
scale_ocean_phy_roughness_moon07.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
13 !-------------------------------------------------------------------------------
14 #include "scalelib.h"
16  !-----------------------------------------------------------------------------
17  !
18  !++ used modules
19  !
20  use scale_precision
21  use scale_io
22  use scale_prof
23  !-----------------------------------------------------------------------------
24  implicit none
25  private
26  !-----------------------------------------------------------------------------
27  !
28  !++ Public procedure
29  !
32 
33  !-----------------------------------------------------------------------------
34  !
35  !++ Public parameters & variables
36  !
37  !-----------------------------------------------------------------------------
38  !
39  !++ Private procedure
40  !
41  !-----------------------------------------------------------------------------
42  !
43  !++ Private parameters & variables
44  !
45  integer, private :: OCEAN_PHY_ROUGHNESS_moon07_itelim = 10 ! maximum iteration number
46 
47  !-----------------------------------------------------------------------------
48 contains
49  !-----------------------------------------------------------------------------
51  use scale_prc, only: &
52  prc_abort
53  use scale_ocean_phy_roughness, only: &
55  implicit none
56 
57  namelist / param_ocean_phy_roughness_moon07 / &
58  ocean_phy_roughness_moon07_itelim
59 
60  integer :: ierr
61  !---------------------------------------------------------------------------
62 
63  ! common setup
65 
66  !--- read namelist
67  rewind(io_fid_conf)
68  read(io_fid_conf,nml=param_ocean_phy_roughness_moon07,iostat=ierr)
69  if( ierr < 0 ) then !--- missing
70  log_info("OCEAN_PHY_ROUGHNESS_moon07_setup",*) 'Not found namelist. Default used.'
71  elseif( ierr > 0 ) then !--- fatal error
72  log_error("OCEAN_PHY_ROUGHNESS_moon07_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_PHY_ROUGHNESS_MOON07. Check!'
73  call prc_abort
74  endif
75  log_nml(param_ocean_phy_roughness_moon07)
76 
77  return
79 
80  !-----------------------------------------------------------------------------
81  subroutine ocean_phy_roughness_moon07( &
82  OIA, OIS, OIE, OJA, OJS, OJE, &
83  Uabs, Z1, &
84  mask, &
85  Z0M, Z0H, Z0E )
86  use scale_const, only: &
87  undef => const_undef, &
88  grav => const_grav, &
89  karman => const_karman
90  use scale_ocean_phy_roughness, only: &
96  implicit none
97  integer, intent(in) :: oia, ois, oie
98  integer, intent(in) :: oja, ojs, oje
99 
100  real(rp), intent(in) :: uabs(oia,oja) ! velocity at the lowest atomspheric layer [m/s]
101  real(rp), intent(in) :: z1 (oia,oja) ! cell center height at the lowest atmospheric layer [m]
102  logical, intent(in) :: mask(oia,oja)
103 
104  real(rp), intent(inout) :: z0m(oia,oja) ! roughness length for momentum [m]
105  real(rp), intent(out) :: z0h(oia,oja) ! roughness length for heat [m]
106  real(rp), intent(out) :: z0e(oia,oja) ! roughness length for vapor [m]
107 
108  ! works
109  real(rp) :: ustar
110  real(rp) :: u10m
111 
112  integer :: ite
113  integer :: i, j
114  !---------------------------------------------------------------------------
115 
116  !$omp parallel do default(none) OMP_SCHEDULE_ &
117  !$omp shared(OJS,OJE,OIS,OIE, &
118  !$omp GRAV,UNDEF, &
119  !$omp OCEAN_PHY_ROUGHNESS_Z0M_min,OCEAN_PHY_ROUGHNESS_Z0H_min,OCEAN_PHY_ROUGHNESS_Z0E_min, &
120  !$omp OCEAN_PHY_ROUGHNESS_Ustar_min,OCEAN_PHY_ROUGHNESS_visck,OCEAN_PHY_ROUGHNESS_moon07_itelim, &
121  !$omp Z0M,Z0H,Z0E,Uabs,Z1,mask) &
122  !$omp private(i,j,ite,U10M,Ustar)
123  do j = ojs, oje
124  do i = ois, oie
125  if ( mask(i,j) ) then
126 
127  z0m(i,j) = max( z0m(i,j), ocean_phy_roughness_z0m_min )
128 
129  do ite = 1, ocean_phy_roughness_moon07_itelim
130  ustar = max( karman * uabs(i,j) / log( z1(i,j)/z0m(i,j) ), ocean_phy_roughness_ustar_min )
131  u10m = ustar / karman * log( 10.0_rp/z0m(i,j) )
132 
133  if ( u10m <= 12.5_rp ) then
134  z0m(i,j) = 0.0185_rp * ustar**2 / grav
135  else
136  z0m(i,j) = ( 0.085_rp * ( - 0.56_rp * ustar**2 &
137  + 20.255_rp * ustar &
138  + 2.458_rp ) &
139  - 0.58_rp ) * 1.0e-3_rp
140  end if
141  z0m(i,j) = max( z0m(i,j), ocean_phy_roughness_z0m_min )
142  enddo
143 
144  ! Fairall et al. TOGA V3.0
145  ! Fairall et al. (2003) JCLI, vol. 16, 571-591. Eq. (28)
146  z0h(i,j) = min( 5.5e-5_rp / ( z0m(i,j) * ustar / ocean_phy_roughness_visck )**0.6_rp, &
147  1.1e-4_rp )
148  z0e(i,j) = z0h(i,j)
149  z0h(i,j) = max( z0h(i,j), ocean_phy_roughness_z0h_min )
150  z0e(i,j) = max( z0e(i,j), ocean_phy_roughness_z0e_min )
151 
152  else
153  z0h(i,j) = undef
154  z0e(i,j) = undef
155  end if
156  enddo
157  enddo
158 
159  return
160  end subroutine ocean_phy_roughness_moon07
161 
scale_const::const_grav
real(rp), public const_grav
standard acceleration of gravity [m/s2]
Definition: scale_const.F90:46
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
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_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_moon07
module ocean / physics / surface roughness length / moon07
Definition: scale_ocean_phy_roughness_moon07.F90:15
scale_ocean_phy_roughness_moon07::ocean_phy_roughness_moon07_setup
subroutine, public ocean_phy_roughness_moon07_setup
Definition: scale_ocean_phy_roughness_moon07.F90:51
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_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_const::const_karman
real(rp), parameter, public const_karman
von Karman constant
Definition: scale_const.F90:50
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:41
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_moon07::ocean_phy_roughness_moon07
subroutine, public ocean_phy_roughness_moon07(OIA, OIS, OIE, OJA, OJS, OJE, Uabs, Z1, mask, Z0M, Z0H, Z0E)
Definition: scale_ocean_phy_roughness_moon07.F90:86