SCALE-RM
scale_ocean_phy_roughness_miller92.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  !
29 
30  !-----------------------------------------------------------------------------
31  !
32  !++ Public parameters & variables
33  !
34  !-----------------------------------------------------------------------------
35  !
36  !++ Private procedure
37  !
38  !-----------------------------------------------------------------------------
39  !
40  !++ Private parameters & variables
41  !
42  real(RP), private :: OCEAN_PHY_ROUGHNESS_miller92_CM0 = 1.0e-3_rp ! bulk coef. for U*
43  real(RP), private :: OCEAN_PHY_ROUGHNESS_miller92_Z0MI = 0.0e-0_rp ! base roughness length for momentum
44  real(RP), private :: OCEAN_PHY_ROUGHNESS_miller92_Z0MR = 1.8e-2_rp ! rough factor for momentum
45  real(RP), private :: OCEAN_PHY_ROUGHNESS_miller92_Z0MS = 1.1e-1_rp ! smooth factor for momentum
46  real(RP), private :: OCEAN_PHY_ROUGHNESS_miller92_Z0HI = 1.4e-5_rp ! base roughness length for heat
47  real(RP), private :: OCEAN_PHY_ROUGHNESS_miller92_Z0HR = 0.0e-0_rp ! rough factor for heat
48  real(RP), private :: OCEAN_PHY_ROUGHNESS_miller92_Z0HS = 4.0e-1_rp ! smooth factor for heat
49  real(RP), private :: OCEAN_PHY_ROUGHNESS_miller92_Z0EI = 1.3e-4_rp ! base roughness length for moisture
50  real(RP), private :: OCEAN_PHY_ROUGHNESS_miller92_Z0ER = 0.0e-0_rp ! rough factor for moisture
51  real(RP), private :: OCEAN_PHY_ROUGHNESS_miller92_Z0ES = 6.2e-1_rp ! smooth factor for moisture
52 
53  !-----------------------------------------------------------------------------
54 contains
55  !-----------------------------------------------------------------------------
57  use scale_prc, only: &
58  prc_abort
59  use scale_ocean_phy_roughness, only: &
61  implicit none
62 
63  namelist / param_ocean_phy_roughness_miller92 / &
64  ocean_phy_roughness_miller92_cm0, &
65  ocean_phy_roughness_miller92_z0mi, &
66  ocean_phy_roughness_miller92_z0mr, &
67  ocean_phy_roughness_miller92_z0ms, &
68  ocean_phy_roughness_miller92_z0hi, &
69  ocean_phy_roughness_miller92_z0hr, &
70  ocean_phy_roughness_miller92_z0hs, &
71  ocean_phy_roughness_miller92_z0ei, &
72  ocean_phy_roughness_miller92_z0er, &
73  ocean_phy_roughness_miller92_z0es
74 
75  integer :: ierr
76  !---------------------------------------------------------------------------
77 
78  ! common setup
80 
81  !--- read namelist
82  rewind(io_fid_conf)
83  read(io_fid_conf,nml=param_ocean_phy_roughness_miller92,iostat=ierr)
84  if( ierr < 0 ) then !--- missing
85  log_info("OCEAN_PHY_ROUGHNESS_miller92_setup",*) 'Not found namelist. Default used.'
86  elseif( ierr > 0 ) then !--- fatal error
87  log_error("OCEAN_PHY_ROUGHNESS_miller92_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_PHY_ROUGHNESS_MILLER92. Check!'
88  call prc_abort
89  endif
90  log_nml(param_ocean_phy_roughness_miller92)
91 
92  return
94 
95  !-----------------------------------------------------------------------------
96  subroutine ocean_phy_roughness_miller92( &
97  OIA, OIS, OIE, &
98  OJA, OJS, OJE, &
99  Uabs, &
100  Z0M, Z0H, Z0E )
101  use scale_const, only: &
102  grav => const_grav
103  use scale_ocean_phy_roughness, only: &
109  implicit none
110 
111  integer, intent(in) :: oia, ois, oie
112  integer, intent(in) :: oja, ojs, oje
113  real(rp), intent(in) :: uabs(oia,oja) ! velocity at the lowest atomspheric layer [m/s]
114  real(rp), intent(out) :: z0m (oia,oja) ! roughness length for momentum [m]
115  real(rp), intent(out) :: z0h (oia,oja) ! roughness length for heat [m]
116  real(rp), intent(out) :: z0e (oia,oja) ! roughness length for vapor [m]
117 
118  real(rp) :: ustar
119 
120  integer :: i, j
121  !---------------------------------------------------------------------------
122  !$acc data copyin(Uabs) copyout(Z0M,Z0H,Z0E)
123 
124  !$acc kernels
125  !$omp parallel do private(Ustar)
126  do j = ojs, oje
127  do i = ois, oie
128  ustar = max( sqrt( ocean_phy_roughness_miller92_cm0 ) * uabs(i,j), ocean_phy_roughness_ustar_min )
129 
130  z0m(i,j) = max( ocean_phy_roughness_miller92_z0mi &
131  + ocean_phy_roughness_miller92_z0mr / grav * ustar * ustar &
132  + ocean_phy_roughness_miller92_z0ms * ocean_phy_roughness_visck / ustar, &
134  z0h(i,j) = max( ocean_phy_roughness_miller92_z0hi &
135  + ocean_phy_roughness_miller92_z0hr / grav * ustar * ustar &
136  + ocean_phy_roughness_miller92_z0hs * ocean_phy_roughness_visck / ustar, &
138  z0e(i,j) = max( ocean_phy_roughness_miller92_z0ei &
139  + ocean_phy_roughness_miller92_z0er / grav * ustar * ustar &
140  + ocean_phy_roughness_miller92_z0es * ocean_phy_roughness_visck / ustar, &
142  enddo
143  enddo
144  !$acc end kernels
145 
146  !$acc end data
147  return
148  end subroutine ocean_phy_roughness_miller92
149 
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_prc
module PROCESS
Definition: scale_prc.F90:11
scale_io
module STDIO
Definition: scale_io.F90:10
scale_ocean_phy_roughness_miller92::ocean_phy_roughness_miller92_setup
subroutine, public ocean_phy_roughness_miller92_setup
Definition: scale_ocean_phy_roughness_miller92.F90:57
scale_ocean_phy_roughness_miller92::ocean_phy_roughness_miller92
subroutine, public ocean_phy_roughness_miller92(OIA, OIS, OIE, OJA, OJS, OJE, Uabs, Z0M, Z0H, Z0E)
Definition: scale_ocean_phy_roughness_miller92.F90:101
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_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:57
scale_ocean_phy_roughness_miller92
module ocean / physics / surface roughness length / miller92
Definition: scale_ocean_phy_roughness_miller92.F90:12
scale_ocean_phy_roughness::ocean_phy_roughness_z0e_min
real(rp), public ocean_phy_roughness_z0e_min
Definition: scale_ocean_phy_roughness.F90:49