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  !$acc data copyin(Uabs,Z1,mask) copyout(Z0H,Z0E) copy(Z0M)
116 
117  !$omp parallel do default(none) OMP_SCHEDULE_ &
118  !$omp shared(OJS,OJE,OIS,OIE, &
119  !$omp GRAV,UNDEF, &
120  !$omp OCEAN_PHY_ROUGHNESS_Z0M_min,OCEAN_PHY_ROUGHNESS_Z0H_min,OCEAN_PHY_ROUGHNESS_Z0E_min, &
121  !$omp OCEAN_PHY_ROUGHNESS_Ustar_min,OCEAN_PHY_ROUGHNESS_visck,OCEAN_PHY_ROUGHNESS_moon07_itelim, &
122  !$omp Z0M,Z0H,Z0E,Uabs,Z1,mask) &
123  !$omp private(i,j,ite,U10M,Ustar)
124  !$acc kernels
125  do j = ojs, oje
126  !$acc loop private(ite,U10M,Ustar)
127  do i = ois, oie
128  if ( mask(i,j) ) then
129 
130  z0m(i,j) = max( z0m(i,j), ocean_phy_roughness_z0m_min )
131 
132  !$acc loop seq
133  do ite = 1, ocean_phy_roughness_moon07_itelim
134  ustar = max( karman * uabs(i,j) / log( z1(i,j)/z0m(i,j) ), ocean_phy_roughness_ustar_min )
135  u10m = ustar / karman * log( 10.0_rp/z0m(i,j) )
136 
137  if ( u10m <= 12.5_rp ) then
138  z0m(i,j) = 0.0185_rp * ustar**2 / grav
139  else
140  z0m(i,j) = ( 0.085_rp * ( - 0.56_rp * ustar**2 &
141  + 20.255_rp * ustar &
142  + 2.458_rp ) &
143  - 0.58_rp ) * 1.0e-3_rp
144  end if
145  z0m(i,j) = max( z0m(i,j), ocean_phy_roughness_z0m_min )
146  enddo
147 
148  ! Fairall et al. TOGA V3.0
149  ! Fairall et al. (2003) JCLI, vol. 16, 571-591. Eq. (28)
150  z0h(i,j) = min( 5.5e-5_rp / ( z0m(i,j) * ustar / ocean_phy_roughness_visck )**0.6_rp, &
151  1.1e-4_rp )
152  z0e(i,j) = z0h(i,j)
153  z0h(i,j) = max( z0h(i,j), ocean_phy_roughness_z0h_min )
154  z0e(i,j) = max( z0e(i,j), ocean_phy_roughness_z0e_min )
155 
156  else
157  z0h(i,j) = undef
158  z0e(i,j) = undef
159  end if
160  enddo
161  enddo
162  !$acc end kernels
163 
164  !$acc end data
165  return
166  end subroutine ocean_phy_roughness_moon07
167 
scale_const::const_grav
real(rp), public const_grav
standard acceleration of gravity [m/s2]
Definition: scale_const.F90:49
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
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:54
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:43
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:57
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