SCALE-RM
Functions/Subroutines
scale_atmos_phy_sf_bulk Module Reference

module atmosphere / physics / surface / bulk More...

Functions/Subroutines

subroutine, public atmos_phy_sf_bulk_setup
 Setup. More...
 
subroutine, public atmos_phy_sf_bulk_flux (IA, IS, IE, JA, JS, JE, ATM_W, ATM_U, ATM_V, ATM_TEMP, ATM_PRES, ATM_QV, SFC_DENS, SFC_TEMP, SFC_PRES, SFC_Z0M, SFC_Z0H, SFC_Z0E, PBL, ATM_Z1, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_LH, SFLX_QV, U10, V10, T2, Q2)
 Calculate surface flux. More...
 

Detailed Description

module atmosphere / physics / surface / bulk

Description
Flux from/to bottom wall of atmosphere (surface) Bulk Method
Author
Team SCALE
NAMELIST
  • PARAM_ATMOS_PHY_SF_BULK
    nametypedefault valuecomment
    ATMOS_PHY_SF_BULK_BETA real(RP) 1.0_RP evaporation efficiency (0-1)

History Output
No history output

Function/Subroutine Documentation

◆ atmos_phy_sf_bulk_setup()

subroutine, public scale_atmos_phy_sf_bulk::atmos_phy_sf_bulk_setup ( )

Setup.

Definition at line 50 of file scale_atmos_phy_sf_bulk.F90.

References scale_io::io_fid_conf, and scale_prc::prc_abort().

Referenced by mod_atmos_phy_sf_driver::atmos_phy_sf_driver_setup().

50  use scale_prc, only: &
51  prc_abort
52  implicit none
53 
54  namelist / param_atmos_phy_sf_bulk / &
55  atmos_phy_sf_bulk_beta
56 
57  integer :: ierr
58  !---------------------------------------------------------------------------
59 
60  log_newline
61  log_info("ATMOS_PHY_SF_bulk_setup",*) 'Setup'
62  log_info("ATMOS_PHY_SF_bulk_setup",*) 'Bulk scheme'
63 
64  !--- read namelist
65  rewind(io_fid_conf)
66  read(io_fid_conf,nml=param_atmos_phy_sf_bulk,iostat=ierr)
67  if( ierr < 0 ) then !--- missing
68  log_info("ATMOS_PHY_SF_bulk_setup",*) 'Not found namelist. Default used.'
69  elseif( ierr > 0 ) then !--- fatal error
70  log_error("ATMOS_PHY_SF_bulk_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_PHY_SF_BULK. Check!'
71  call prc_abort
72  endif
73  log_nml(param_atmos_phy_sf_bulk)
74 
75  return
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
module PROCESS
Definition: scale_prc.F90:11
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_sf_bulk_flux()

subroutine, public scale_atmos_phy_sf_bulk::atmos_phy_sf_bulk_flux ( integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (ia,ja), intent(in)  ATM_W,
real(rp), dimension (ia,ja), intent(in)  ATM_U,
real(rp), dimension (ia,ja), intent(in)  ATM_V,
real(rp), dimension(ia,ja), intent(in)  ATM_TEMP,
real(rp), dimension(ia,ja), intent(in)  ATM_PRES,
real(rp), dimension (ia,ja), intent(in)  ATM_QV,
real(rp), dimension(ia,ja), intent(in)  SFC_DENS,
real(rp), dimension(ia,ja), intent(in)  SFC_TEMP,
real(rp), dimension(ia,ja), intent(in)  SFC_PRES,
real(rp), dimension (ia,ja), intent(in)  SFC_Z0M,
real(rp), dimension (ia,ja), intent(in)  SFC_Z0H,
real(rp), dimension (ia,ja), intent(in)  SFC_Z0E,
real(rp), dimension (ia,ja), intent(in)  PBL,
real(rp), dimension (ia,ja), intent(in)  ATM_Z1,
real(rp), dimension(ia,ja), intent(out)  SFLX_MW,
real(rp), dimension(ia,ja), intent(out)  SFLX_MU,
real(rp), dimension(ia,ja), intent(out)  SFLX_MV,
real(rp), dimension(ia,ja), intent(out)  SFLX_SH,
real(rp), dimension(ia,ja), intent(out)  SFLX_LH,
real(rp), dimension(ia,ja), intent(out)  SFLX_QV,
real(rp), dimension (ia,ja), intent(out)  U10,
real(rp), dimension (ia,ja), intent(out)  V10,
real(rp), dimension (ia,ja), intent(out)  T2,
real(rp), dimension (ia,ja), intent(out)  Q2 
)

Calculate surface flux.

Definition at line 90 of file scale_atmos_phy_sf_bulk.F90.

References scale_bulkflux::bulkflux, scale_const::const_cpdry, and scale_const::const_epsvap.

Referenced by mod_atmos_phy_sf_driver::atmos_phy_sf_driver_calc_tendency().

90  use scale_const, only: &
91  cpdry => const_cpdry, &
92  epsvap => const_epsvap
93  use scale_atmos_hydrometeor, only: &
94  hydrometeor_lhv => atmos_hydrometeor_lhv
95  use scale_atmos_saturation, only: &
96  saturation_psat_all => atmos_saturation_psat_all
97  use scale_bulkflux, only: &
98  bulkflux
99  implicit none
100  integer, intent(in) :: ia, is, ie
101  integer, intent(in) :: ja, js, je
102 
103  real(RP), intent(in) :: atm_w (ia,ja) ! velocity w at the lowermost layer (cell center) [m/s]
104  real(RP), intent(in) :: atm_u (ia,ja) ! velocity u at the lowermost layer (cell center) [m/s]
105  real(RP), intent(in) :: atm_v (ia,ja) ! velocity v at the lowermost layer (cell center) [m/s]
106  real(RP), intent(in) :: atm_temp(ia,ja) ! temperature at the lowermost layer (cell center) [K]
107  real(RP), intent(in) :: atm_pres(ia,ja) ! pressure at the lowermost layer (cell center) [Pa]
108  real(RP), intent(in) :: atm_qv (ia,ja) ! qv at the lowermost layer (cell center) [kg/kg]
109  real(RP), intent(in) :: sfc_dens(ia,ja) ! density at the surface atmosphere [kg/m3]
110  real(RP), intent(in) :: sfc_temp(ia,ja) ! temperature at the surface skin [K]
111  real(RP), intent(in) :: sfc_pres(ia,ja) ! pressure at the surface atmosphere [Pa]
112  real(RP), intent(in) :: sfc_z0m (ia,ja) ! surface roughness length (momentum) [m]
113  real(RP), intent(in) :: sfc_z0h (ia,ja) ! surface roughness length (heat) [m]
114  real(RP), intent(in) :: sfc_z0e (ia,ja) ! surface roughness length (vapor) [m]
115  real(RP), intent(in) :: pbl (ia,ja) ! depth of the PBL [m]
116  real(RP), intent(in) :: atm_z1 (ia,ja) ! height of the lowermost grid from surface (cell center) [m]
117 
118  real(RP), intent(out) :: sflx_mw(ia,ja) ! surface flux for z-momentum (area center) [m/s*kg/m2/s]
119  real(RP), intent(out) :: sflx_mu(ia,ja) ! surface flux for x-momentum (area center) [m/s*kg/m2/s]
120  real(RP), intent(out) :: sflx_mv(ia,ja) ! surface flux for y-momentum (area center) [m/s*kg/m2/s]
121  real(RP), intent(out) :: sflx_sh(ia,ja) ! surface flux for sensible heat (area center) [J/m2/s]
122  real(RP), intent(out) :: sflx_lh(ia,ja) ! surface flux for latent heat (area center) [J/m2/s]
123  real(RP), intent(out) :: sflx_qv(ia,ja) ! surface flux for qv (area center) [kg/m2/s]
124  real(RP), intent(out) :: u10 (ia,ja) ! velocity u at 10m height
125  real(RP), intent(out) :: v10 (ia,ja) ! velocity v at 10m height
126  real(RP), intent(out) :: t2 (ia,ja) ! temperature t at 2m height
127  real(RP), intent(out) :: q2 (ia,ja) ! water vapor q at 2m height
128 
129  real(RP) :: sfc_psat (ia,ja) ! saturatad water vapor pressure [Pa]
130  real(RP) :: lhv (ia,ja)
131 
132  real(RP) :: ustar ! friction velocity [m]
133  real(RP) :: tstar ! friction temperature [K]
134  real(RP) :: qstar ! friction mixing rate [kg/kg]
135  real(RP) :: uabs ! modified absolute velocity [m/s]
136  real(RP) :: ra ! Aerodynamic resistance (=1/Ce) [1/s]
137  real(RP) :: sfc_qsat ! saturatad water vapor mixing ratio [kg/kg]
138  real(RP) :: sfc_qv ! water vapor mixing ratio [kg/kg]
139 
140  real(RP) :: fracu10 ! calculation parameter for U10 [-]
141  real(RP) :: fract2 ! calculation parameter for T2 [-]
142  real(RP) :: fracq2 ! calculation parameter for Q2 [-]
143 
144  integer :: i, j
145  !---------------------------------------------------------------------------
146 
147  log_progress(*) 'atmosphere / physics / surface flux / bulk'
148 
149  ! ToDo consider ATM_TEMP is appropriate
150  call hydrometeor_lhv( ia, is, ie, ja, js, je, &
151  atm_temp(:,:), & ! [IN]
152  lhv(:,:) ) ! [OUT]
153 
154  call saturation_psat_all( ia, is, ie, ja, js, je, &
155  sfc_temp(:,:), & ! [IN]
156  sfc_psat(:,:) ) ! [OUT]
157 
158 #ifndef __GFORTRAN__
159  !$omp parallel do default(none) &
160  !$omp private(SFC_QSAT,SFC_QV,Ustar,Tstar,Qstar,Uabs,Ra,FracU10,FracT2,FracQ2) &
161  !$omp shared (IS,IE,JS,JE,EPSvap,ATMOS_PHY_SF_BULK_beta,CPdry,LHV,bulkflux, &
162  !$omp ATM_TEMP,ATM_PRES,ATM_QV,ATM_W,ATM_U,ATM_V,ATM_Z1, &
163  !$omp SFC_DENS,SFC_TEMP,SFC_PRES,SFC_PSAT,SFC_Z0M,SFC_Z0H,SFC_Z0E,PBL, &
164  !$omp SFLX_MW,SFLX_MU,SFLX_MV,SFLX_SH,SFLX_LH,SFLX_QV,U10,V10,T2,Q2)
165 #else
166  !$omp parallel do default(shared) &
167  !$omp private(SFC_QSAT,SFC_QV,Ustar,Tstar,Qstar,Uabs,Ra,FracU10,FracT2,FracQ2)
168 #endif
169  do j = js, je
170  do i = is, ie
171  ! qdry = 1 - psat
172  sfc_qsat = epsvap * sfc_psat(i,j) / ( sfc_pres(i,j) - ( 1.0_rp-epsvap ) * sfc_psat(i,j) )
173 
174  sfc_qv = ( 1.0_rp - atmos_phy_sf_bulk_beta ) * atm_qv(i,j) + atmos_phy_sf_bulk_beta * sfc_qsat
175 
176  call bulkflux( ustar, & ! [OUT]
177  tstar, & ! [OUT]
178  qstar, & ! [OUT]
179  uabs, & ! [OUT]
180  ra, & ! [OUT]
181  fracu10, & ! [OUT]
182  fract2, & ! [OUT]
183  fracq2, & ! [OUT]
184  atm_temp(i,j), & ! [IN]
185  sfc_temp(i,j), & ! [IN]
186  atm_pres(i,j), & ! [IN]
187  sfc_pres(i,j), & ! [IN]
188  atm_qv(i,j), & ! [IN]
189  sfc_qv , & ! [IN]
190  atm_u(i,j), & ! [IN]
191  atm_v(i,j), & ! [IN]
192  atm_z1(i,j), & ! [IN]
193  pbl(i,j), & ! [IN]
194  sfc_z0m(i,j), & ! [IN]
195  sfc_z0h(i,j), & ! [IN]
196  sfc_z0e(i,j) ) ! [IN]
197 
198  !-----< momentum >-----
199  sflx_mw(i,j) = -sfc_dens(i,j) * ustar * ustar / uabs * atm_w(i,j)
200  sflx_mu(i,j) = -sfc_dens(i,j) * ustar * ustar / uabs * atm_u(i,j)
201  sflx_mv(i,j) = -sfc_dens(i,j) * ustar * ustar / uabs * atm_v(i,j)
202 
203  !-----< heat flux >-----
204  sflx_sh(i,j) = -sfc_dens(i,j) * ustar * tstar * cpdry
205  sflx_lh(i,j) = -sfc_dens(i,j) * ustar * qstar * lhv(i,j)
206 
207  !-----< mass flux >-----
208  sflx_qv(i,j) = sflx_lh(i,j) / lhv(i,j)
209 
210  !-----< U10, T2, q2 >-----
211  !U10(i,j) = FracU10 * ATM_U(i,j)
212  !V10(i,j) = FracU10 * ATM_V(i,j)
213  !T2 (i,j) = ( 1.0_RP - FracT2 ) * SFC_TEMP(i,j) + FracT2 * ATM_TEMP(i,j)
214  !Q2 (i,j) = ( 1.0_RP - FracQ2 ) * SFC_QV + FracQ2 * ATM_QV (i,j)
215 
216  u10(i,j) = atm_u(i,j) * log( 10.0_rp / sfc_z0m(i,j) ) / log( atm_z1(i,j) / sfc_z0m(i,j) )
217  v10(i,j) = atm_v(i,j) * log( 10.0_rp / sfc_z0m(i,j) ) / log( atm_z1(i,j) / sfc_z0m(i,j) )
218  t2(i,j) = sfc_temp(i,j) + ( atm_temp(i,j) - sfc_temp(i,j) ) &
219  * ( log( 2.0_rp / sfc_z0m(i,j) ) * log( 2.0_rp / sfc_z0h(i,j) ) ) &
220  / ( log( atm_z1(i,j) / sfc_z0m(i,j) ) * log( atm_z1(i,j) / sfc_z0h(i,j) ) )
221  q2(i,j) = sfc_qv + ( atm_qv(i,j) - sfc_qv ) &
222  * ( log( 2.0_rp / sfc_z0m(i,j) ) * log( 2.0_rp / sfc_z0e(i,j) ) ) &
223  / ( log( atm_z1(i,j) / sfc_z0m(i,j) ) * log( atm_z1(i,j) / sfc_z0e(i,j) ) )
224  enddo
225  enddo
226 
227  return
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
Definition: scale_const.F90:56
module atmosphere / saturation
integer, public ia
of whole cells: x, local, with HALO
integer, public ja
of whole cells: y, local, with HALO
integer, public is
start point of inner domain: x, local
integer, public ie
end point of inner domain: x, local
module atmosphere / hydrometeor
integer, public je
end point of inner domain: y, local
procedure(bc), pointer, public bulkflux
real(rp), public const_epsvap
Rdry / Rvap.
Definition: scale_const.F90:69
module CONSTANT
Definition: scale_const.F90:11
integer, public js
start point of inner domain: y, local
module Surface bulk flux
Here is the caller graph for this function: