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  Z0M, Z0H, Z0E )
85  use scale_const, only: &
86  grav => const_grav, &
87  karman => const_karman
88  use scale_ocean_phy_roughness, only: &
94  implicit none
95  integer, intent(in) :: OIA, OIS, OIE
96  integer, intent(in) :: OJA, OJS, OJE
97 
98  real(RP), intent(in) :: Uabs(oia,oja) ! velocity at the lowest atomspheric layer [m/s]
99  real(RP), intent(in) :: Z1 (oia,oja) ! cell center height at the lowest atmospheric layer [m]
100 
101  real(RP), intent(inout) :: Z0M(oia,oja) ! roughness length for momentum [m]
102  real(RP), intent(out) :: Z0H(oia,oja) ! roughness length for heat [m]
103  real(RP), intent(out) :: Z0E(oia,oja) ! roughness length for vapor [m]
104 
105  ! works
106  real(RP) :: Ustar(oia,oja)
107  real(RP) :: U10M
108 
109  integer :: ite
110  integer :: i, j
111  !---------------------------------------------------------------------------
112 
113  !$omp parallel do default(none) OMP_SCHEDULE_ &
114  !$omp shared(OJS,OJE,OIS,OIE,Z0M,OCEAN_PHY_ROUGHNESS_Z0M_min)
115  do j = ojs, oje
116  do i = ois, oie
117  z0m(i,j) = max( z0m(i,j), ocean_phy_roughness_z0m_min )
118  enddo
119  enddo
120 
121  do ite = 1, ocean_phy_roughness_moon07_itelim
122  !$omp parallel do default(none) OMP_SCHEDULE_ &
123  !$omp shared(OJS,OJE,OIS,OIE,Ustar,Z0M,Uabs,Z1,OCEAN_PHY_ROUGHNESS_Ustar_min,GRAV,OCEAN_PHY_ROUGHNESS_Z0M_min) &
124  !$omp private(i,j,U10M)
125  do j = ojs, oje
126  do i = ois, oie
127  ustar(i,j) = max( karman * uabs(i,j) / log( z1(i,j)/z0m(i,j) ), ocean_phy_roughness_ustar_min )
128  u10m = ustar(i,j) / karman * log( 10.0_rp/z0m(i,j) )
129 
130  if ( u10m <= 12.5_rp ) then
131  z0m(i,j) = max( 0.0185_rp * ustar(i,j)**2 / grav, ocean_phy_roughness_z0m_min )
132  else
133  z0m(i,j) = max( 1.0e-3_rp * ( 0.085_rp * ( -0.56_rp*ustar(i,j)**2 &
134  + 20.255_rp*ustar(i,j) &
135  + 2.458_rp ) - 0.58_rp ), &
137  end if
138  enddo
139  enddo
140  enddo
141 
142  ! Fairall et al. TOGA V3.0
143  ! Fairall et al. (2003) JCLI, vol. 16, 571-591. Eq. (28)
144  !$omp parallel do default(none) OMP_SCHEDULE_ &
145  !$omp shared(OJS,OJE,OIS,OIE, &
146  !$omp Z0H,Z0E,Z0M,Ustar,OCEAN_PHY_ROUGHNESS_visck,OCEAN_PHY_ROUGHNESS_Z0H_min,OCEAN_PHY_ROUGHNESS_Z0E_min)
147  do j = ojs, oje
148  do i = ois, oie
149  z0h(i,j) = min( 5.5e-5_rp / ( z0m(i,j) * ustar(i,j) / ocean_phy_roughness_visck )**0.6_rp, 1.1e-4_rp )
150  z0e(i,j) = z0h(i,j)
151  z0h(i,j) = max( z0h(i,j), ocean_phy_roughness_z0h_min )
152  z0e(i,j) = max( z0e(i,j), ocean_phy_roughness_z0e_min )
153  enddo
154  enddo
155 
156  return
157  end subroutine ocean_phy_roughness_moon07
158 
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
real(rp), parameter, public const_karman
von Karman constant
Definition: scale_const.F90:50
module PROCESS
Definition: scale_prc.F90:11
real(rp), public const_grav
standard acceleration of gravity [m/s2]
Definition: scale_const.F90:46
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
module CONSTANT
Definition: scale_const.F90:11
module ocean / physics / surface roughness length / moon07
module profiler
Definition: scale_prof.F90:11
subroutine, public ocean_phy_roughness_moon07(OIA, OIS, OIE, OJA, OJS, OJE, Uabs, Z1, Z0M, Z0H, Z0E)
subroutine, public ocean_phy_roughness_setup
module PRECISION
module STDIO
Definition: scale_io.F90:10
module ocean / physics / surface roughness length