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 
123  !$omp parallel do private(Ustar)
124  do j = ojs, oje
125  do i = ois, oie
126  ustar = max( sqrt( ocean_phy_roughness_miller92_cm0 ) * uabs(i,j), ocean_phy_roughness_ustar_min )
127 
128  z0m(i,j) = max( ocean_phy_roughness_miller92_z0mi &
129  + ocean_phy_roughness_miller92_z0mr / grav * ustar * ustar &
130  + ocean_phy_roughness_miller92_z0ms * ocean_phy_roughness_visck / ustar, &
132  z0h(i,j) = max( ocean_phy_roughness_miller92_z0hi &
133  + ocean_phy_roughness_miller92_z0hr / grav * ustar * ustar &
134  + ocean_phy_roughness_miller92_z0hs * ocean_phy_roughness_visck / ustar, &
136  z0e(i,j) = max( ocean_phy_roughness_miller92_z0ei &
137  + ocean_phy_roughness_miller92_z0er / grav * ustar * ustar &
138  + ocean_phy_roughness_miller92_z0es * ocean_phy_roughness_visck / ustar, &
140  enddo
141  enddo
142 
143  return
144  end subroutine ocean_phy_roughness_miller92
145 
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
subroutine, public ocean_phy_roughness_miller92(OIA, OIS, OIE, OJA, OJS, OJE, Uabs, Z0M, Z0H, Z0E)
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 / miller92
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