SCALE-RM
Functions/Subroutines
scale_atmos_phy_sf_bulk Module Reference

module ATMOSPHERE / Physics Surface fluxes More...

Functions/Subroutines

subroutine, public atmos_phy_sf_bulk_setup (ATMOS_PHY_SF_TYPE)
 Setup. More...
 
subroutine, public atmos_phy_sf_bulk (ATM_TEMP, ATM_PRES, ATM_W, ATM_U, ATM_V, ATM_DENS, ATM_QTRC, ATM_Z1, dt, SFC_DENS, SFC_PRES, SFLX_LW_dn, SFLX_SW_dn, SFC_TEMP, SFC_albedo, SFC_beta, SFC_Z0M, SFC_Z0H, SFC_Z0E, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_LH, SFLX_QTRC, U10, V10, T2, Q2)
 Calculate surface flux. More...
 

Detailed Description

module ATMOSPHERE / Physics Surface fluxes

Description
Flux from/to bottom wall of atmosphere (surface) Bulk Method
Author
Team SCALE
History
  • 2011-12-03 (Y.Miyamoto) [new]
  • 2011-12-11 (H.Yashiro) [mod] integrate to SCALE-LES ver.3
  • 2012-03-23 (H.Yashiro) [mod] Explicit index parameter inclusion
  • 2012-04-10 (Y.Miyamoto) [mod] introduce coefficients for interpolation
  • 2012-09-11 (S.Nishizawa) [mod] bugfix based on the scale document
NAMELIST
  • PARAM_ATMOS_PHY_SF_BULK
    nametypedefault valuecomment
    ATMOS_PHY_SF_U_MINM real(RP) 0.0_RP minimum limit of absolute velocity for momentum [m/s]
    ATMOS_PHY_SF_U_MINH real(RP) 0.0_RP minimum limit of absolute velocity for heat [m/s]
    ATMOS_PHY_SF_U_MINE real(RP) 0.0_RP minimum limit of absolute velocity for vapor [m/s]

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 ( character(len=*), intent(in)  ATMOS_PHY_SF_TYPE)

Setup.

Definition at line 63 of file scale_atmos_phy_sf_bulk.F90.

References scale_atmos_phy_sf_bulkcoef::atmos_phy_sf_bulkcoef_setup(), scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_l, scale_stdio::io_lnml, and scale_process::prc_mpistop().

Referenced by scale_atmos_phy_sf::atmos_phy_sf_setup().

63  use scale_process, only: &
65  use scale_atmos_phy_sf_bulkcoef, only: &
66  sf_bulkcoef_setup => atmos_phy_sf_bulkcoef_setup
67  implicit none
68 
69  character(len=*), intent(in) :: atmos_phy_sf_type
70 
71  namelist / param_atmos_phy_sf_bulk / &
72  atmos_phy_sf_u_minm, &
73  atmos_phy_sf_u_minh, &
74  atmos_phy_sf_u_mine
75 
76  integer :: ierr
77  !---------------------------------------------------------------------------
78 
79  if( io_l ) write(io_fid_log,*)
80  if( io_l ) write(io_fid_log,*) '++++++ Module[SURFACE FLUX] / Categ[ATMOS PHYSICS] / Origin[SCALElib]'
81  if( io_l ) write(io_fid_log,*) '+++ Bulk scheme'
82 
83  if ( atmos_phy_sf_type /= 'BULK' ) then
84  write(*,*) 'xxx ATMOS_PHY_SF_TYPE is not BULK. Check!'
85  call prc_mpistop
86  endif
87 
88  !--- read namelist
89  rewind(io_fid_conf)
90  read(io_fid_conf,nml=param_atmos_phy_sf_bulk,iostat=ierr)
91  if( ierr < 0 ) then !--- missing
92  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
93  elseif( ierr > 0 ) then !--- fatal error
94  write(*,*) 'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_SF_BULK. Check!'
95  call prc_mpistop
96  endif
97  if( io_lnml ) write(io_fid_log,nml=param_atmos_phy_sf_bulk)
98 
99  call sf_bulkcoef_setup
100 
101  return
subroutine, public prc_mpistop
Abort MPI.
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
module PROCESS
logical, public io_lnml
output log or not? (for namelist, this process)
Definition: scale_stdio.F90:60
integer, public io_fid_conf
Config file ID.
Definition: scale_stdio.F90:55
module ATMOSPHERE / Physics Surface bulk coefficient
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_sf_bulk()

subroutine, public scale_atmos_phy_sf_bulk::atmos_phy_sf_bulk ( 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_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_DENS,
real(rp), dimension (ia,ja,qa), intent(in)  ATM_QTRC,
real(rp), dimension (ia,ja), intent(in)  ATM_Z1,
real(dp), intent(in)  dt,
real(rp), dimension (ia,ja), intent(in)  SFC_DENS,
real(rp), dimension (ia,ja), intent(in)  SFC_PRES,
real(rp), dimension(ia,ja), intent(in)  SFLX_LW_dn,
real(rp), dimension(ia,ja), intent(in)  SFLX_SW_dn,
real(rp), dimension (ia,ja), intent(in)  SFC_TEMP,
real(rp), dimension(ia,ja,2), intent(in)  SFC_albedo,
real(rp), dimension (ia,ja), intent(in)  SFC_beta,
real(rp), dimension (ia,ja), intent(inout)  SFC_Z0M,
real(rp), dimension (ia,ja), intent(inout)  SFC_Z0H,
real(rp), dimension (ia,ja), intent(inout)  SFC_Z0E,
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,qa), intent(out)  SFLX_QTRC,
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 118 of file scale_atmos_phy_sf_bulk.F90.

References scale_atmos_phy_sf_bulkcoef::atmos_phy_sf_bulkcoef, scale_bulkflux::bulkflux, scale_const::const_cpdry, scale_const::const_rdry, scale_tracer::i_qv, scale_grid_index::ie, scale_stdio::io_fid_log, scale_stdio::io_l, scale_grid_index::is, scale_grid_index::je, scale_grid_index::js, dc_log::log(), and scale_roughness::roughness.

Referenced by scale_atmos_phy_sf::atmos_phy_sf_setup().

118  use scale_grid_index
119  use scale_tracer
120  use scale_const, only: &
121  cpdry => const_cpdry, &
122  rdry => const_rdry
123  use scale_atmos_phy_sf_bulkcoef, only: &
124  sf_bulkcoef => atmos_phy_sf_bulkcoef
125  use scale_atmos_saturation, only: &
126  saturation_pres2qsat_all => atmos_saturation_pres2qsat_all
127  use scale_atmos_thermodyn, only: &
128  atmos_thermodyn_templhv
129  use scale_roughness, only: &
130  roughness
131  use scale_bulkflux, only: &
132  bulkflux
133  implicit none
134 
135  real(RP), intent(in) :: atm_temp (ia,ja) ! temperature at the lowermost layer (cell center) [K]
136  real(RP), intent(in) :: atm_pres (ia,ja) ! pressure at the lowermost layer (cell center) [Pa]
137  real(RP), intent(in) :: atm_w (ia,ja) ! velocity w at the lowermost layer (cell center) [m/s]
138  real(RP), intent(in) :: atm_u (ia,ja) ! velocity u at the lowermost layer (cell center) [m/s]
139  real(RP), intent(in) :: atm_v (ia,ja) ! velocity v at the lowermost layer (cell center) [m/s]
140  real(RP), intent(in) :: atm_dens (ia,ja) ! density at the lowermost layer (cell center) [kg/m3]
141  real(RP), intent(in) :: atm_qtrc (ia,ja,qa) ! tracer at the lowermost layer (cell center) [kg/kg]
142  real(RP), intent(in) :: atm_z1 (ia,ja) ! height of the lowermost grid from surface (cell center) [m]
143  real(DP), intent(in) :: dt ! delta time
144  real(RP), intent(in) :: sfc_dens (ia,ja) ! density at the surface atmosphere [kg/m3]
145  real(RP), intent(in) :: sfc_pres (ia,ja) ! pressure at the surface atmosphere [Pa]
146  real(RP), intent(in) :: sflx_lw_dn(ia,ja) ! downward longwave radiation flux at the surface [J/m2/s]
147  real(RP), intent(in) :: sflx_sw_dn(ia,ja) ! downward shortwave radiation flux at the surface [J/m2/s]
148  real(RP), intent(in) :: sfc_temp (ia,ja) ! temperature at the surface skin [K]
149  real(RP), intent(in) :: sfc_albedo(ia,ja,2) ! surface albedo (LW/SW) [0-1]
150  real(RP), intent(in) :: sfc_beta (ia,ja) ! evaporation efficiency [0-1]
151  real(RP), intent(inout) :: sfc_z0m (ia,ja) ! surface roughness length (momentum) [m]
152  real(RP), intent(inout) :: sfc_z0h (ia,ja) ! surface roughness length (heat) [m]
153  real(RP), intent(inout) :: sfc_z0e (ia,ja) ! surface roughness length (vapor) [m]
154  real(RP), intent(out) :: sflx_mw (ia,ja) ! surface flux for z-momentum (area center) [m/s*kg/m2/s]
155  real(RP), intent(out) :: sflx_mu (ia,ja) ! surface flux for x-momentum (area center) [m/s*kg/m2/s]
156  real(RP), intent(out) :: sflx_mv (ia,ja) ! surface flux for y-momentum (area center) [m/s*kg/m2/s]
157  real(RP), intent(out) :: sflx_sh (ia,ja) ! surface flux for sensible heat (area center) [J/m2/s]
158  real(RP), intent(out) :: sflx_lh (ia,ja) ! surface flux for latent heat (area center) [J/m2/s]
159  real(RP), intent(out) :: sflx_qtrc (ia,ja,qa) ! surface flux for tracer mass (area center) [kg/m2/s]
160  real(RP), intent(out) :: u10 (ia,ja) ! velocity u at 10m height
161  real(RP), intent(out) :: v10 (ia,ja) ! velocity v at 10m height
162  real(RP), intent(out) :: t2 (ia,ja) ! temperature t at 2m height
163  real(RP), intent(out) :: q2 (ia,ja) ! water vapor q at 2m height
164 
165  real(RP) :: sfc_z0m_t(ia,ja)
166  real(RP) :: sfc_z0h_t(ia,ja)
167  real(RP) :: sfc_z0e_t(ia,ja)
168 
169  real(RP) :: sfc_qsat(ia,ja) ! saturatad water vapor mixing ratio [kg/kg]
170 
171  real(RP) :: pbl(ia,ja)
172  real(RP) :: lhv (ia,ja)
173  real(RP) :: ustar
174  real(RP) :: tstar
175  real(RP) :: qstar
176  real(RP) :: uabs
177 
178  integer :: i, j
179  !---------------------------------------------------------------------------
180 
181  if( io_l ) write(io_fid_log,*) '*** Physics step: Surface flux(bulk)'
182 
183  call roughness( sfc_z0m_t(:,:), & ! [OUT]
184  sfc_z0h_t(:,:), & ! [OUT]
185  sfc_z0e_t(:,:), & ! [OUT]
186  sfc_z0m(:,:), & ! [IN]
187  sfc_z0h(:,:), & ! [IN]
188  sfc_z0e(:,:), & ! [IN]
189  atm_u(:,:), & ! [IN]
190  atm_v(:,:), & ! [IN]
191  atm_z1(:,:), & ! [IN]
192  dt ) ! [IN]
193 
194  sfc_z0m(:,:) = sfc_z0m(:,:) + sfc_z0m_t(:,:) * dt
195  sfc_z0h(:,:) = sfc_z0h(:,:) + sfc_z0h_t(:,:) * dt
196  sfc_z0e(:,:) = sfc_z0e(:,:) + sfc_z0e_t(:,:) * dt
197 
198  call saturation_pres2qsat_all( sfc_qsat(:,:), & ! [OUT]
199  sfc_temp(:,:), & ! [IN]
200  sfc_pres(:,:) ) ! [IN]
201 
202  call atmos_thermodyn_templhv( lhv, atm_temp )
203 
204  sflx_qtrc(:,:,:) = 0.0_rp
205  pbl(:,:) = 100.0_rp ! tentative
206  do j = js, je
207  do i = is, ie
208 
209  call bulkflux( &
210  ustar, & ! [OUT]
211  tstar, & ! [OUT]
212  qstar, & ! [OUT]
213  uabs, & ! [OUT]
214  atm_temp(i,j), & ! [IN]
215  sfc_temp(i,j), & ! [IN]
216  atm_pres(i,j), & ! [IN]
217  sfc_pres(i,j), & ! [IN]
218  atm_qtrc(i,j,i_qv), & ! [IN]
219  sfc_qsat(i,j), & ! [IN]
220  atm_u(i,j), & ! [IN]
221  atm_v(i,j), & ! [IN]
222  atm_z1(i,j), & ! [IN]
223  pbl(i,j), & ! [IN]
224  sfc_z0m(i,j), & ! [IN]
225  sfc_z0h(i,j), & ! [IN]
226  sfc_z0e(i,j) ) ! [IN]
227 
228  !-----< momentum >-----
229  sflx_mw(i,j) = -atm_dens(i,j) * ustar**2 / uabs * atm_w(i,j)
230  sflx_mu(i,j) = -atm_dens(i,j) * ustar**2 / uabs * atm_u(i,j)
231  sflx_mv(i,j) = -atm_dens(i,j) * ustar**2 / uabs * atm_v(i,j)
232 
233  !-----< heat flux >-----
234  sflx_sh(i,j) = -cpdry * atm_dens(i,j) * ustar * tstar
235  sflx_lh(i,j) = -lhv(i,j) * atm_dens(i,j) * ustar * qstar * sfc_beta(i,j)
236 
237  !-----< mass flux >-----
238  sflx_qtrc(i,j,i_qv) = sflx_lh(i,j) / lhv(i,j)
239  enddo
240  enddo
241 
242  !-----< U10, T2, q2 >-----
243 
244  do j = js, je
245  do i = is, ie
246  u10(i,j) = atm_u(i,j) * log( 10.0_rp / sfc_z0m(i,j) ) / log( atm_z1(i,j) / sfc_z0m(i,j) )
247  v10(i,j) = atm_v(i,j) * log( 10.0_rp / sfc_z0m(i,j) ) / log( atm_z1(i,j) / sfc_z0m(i,j) )
248  t2(i,j) = sfc_temp(i,j) + ( atm_temp(i,j) - sfc_temp(i,j) ) &
249  * ( log( 2.0_rp / sfc_z0m(i,j) ) * log( 2.0_rp / sfc_z0h(i,j) ) ) &
250  / ( log( atm_z1(i,j) / sfc_z0m(i,j) ) * log( atm_z1(i,j) / sfc_z0h(i,j) ) )
251  q2(i,j) = sfc_qsat(i,j) + ( atm_qtrc(i,j,i_qv) - sfc_qsat(i,j) ) &
252  * ( log( 2.0_rp / sfc_z0m(i,j) ) * log( 2.0_rp / sfc_z0e(i,j) ) ) &
253  / ( log( atm_z1(i,j) / sfc_z0m(i,j) ) * log( atm_z1(i,j) / sfc_z0e(i,j) ) )
254  enddo
255  enddo
256 
257  return
integer, public is
start point of inner domain: x, local
integer, public je
end point of inner domain: y, local
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
Definition: scale_const.F90:58
module ATMOSPHERE / Saturation adjustment
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
integer, public qa
real(rp), public const_rdry
specific gas constant (dry air) [J/kg/K]
Definition: scale_const.F90:57
module grid index
module TRACER
integer, public ia
of x whole cells (local, with HALO)
integer, public i_qv
procedure(bc), pointer, public bulkflux
integer, public js
start point of inner domain: y, local
procedure(rl), pointer, public roughness
procedure(bc), pointer, public atmos_phy_sf_bulkcoef
subroutine, public log(type, message)
Definition: dc_log.f90:133
module CONSTANT
Definition: scale_const.F90:14
integer, public ie
end point of inner domain: x, local
module Surface bulk flux
module ATMOSPHERE / Thermodynamics
module Surface roughness length
module ATMOSPHERE / Physics Surface bulk coefficient
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
integer, public ja
of y whole cells (local, with HALO)
Here is the call graph for this function:
Here is the caller graph for this function: