SCALE-RM
Functions/Subroutines
scale_urban_dyn_kusaka01 Module Reference

module urban / dynamics / Kusaka01 More...

Functions/Subroutines

subroutine, public urban_dyn_kusaka01_setup (UIA, UIS, UIE, UJA, UJS, UJE, fact_urban, Z0M, Z0H, Z0E, ZD, AH_URB, AHL_URB)
 Setup. More...
 
subroutine, public urban_dyn_kusaka01 (UKA, UKS, UKE, UIA, UIS, UIE, UJA, UJS, UJE, TMPA, PRSA, U1, V1, DENS, QA, LHV, Z1, PBL, RHOS, PRSS, LWD, SWD, RAIN, EFLX, Z0M, Z0H, Z0E, ZD, CDZ, TanSL_X, TanSL_Y, fact_urban, dt, TRL_URB, TBL_URB, TGL_URB, TR_URB, TB_URB, TG_URB, TC_URB, QC_URB, UC_URB, RAINR_URB, RAINB_URB, RAING_URB, ROFF_URB, SFC_TEMP, ALBEDO, MWFLX, MUFLX, MVFLX, SHFLX, LHFLX, GHFLX, Ustar, Tstar, Qstar, Wstar, RLmo, U10, V10, T2, Q2)
 Main routine for land submodel. More...
 
subroutine put_history (UIA, UJA, SHR, SHB, SHG, LHR, LHB, LHG, GHR, GHB, GHG, RNR, RNB, RNG, RNgrd)
 

Detailed Description

module urban / dynamics / Kusaka01

Description
Single-layer Urban Canopy Model (Kusaka et al. 2001, BLM)
Author
Team SCALE
NAMELIST
  • PARAM_URBAN_DYN_KUSAKA01
    nametypedefault valuecomment
    DTS_MAX real(RP) 0.1_RP maximum dT during one step [K/step]
    BOUND integer
    URBAN_DYN_KUSAKA01_PARAM_IN_FILENAME character(len=H_LONG) '' urban parameter table
    URBAN_DYN_KUSAKA01_GRIDDED_Z0M_IN_FILENAME character(len=H_LONG) '' gridded data of Z0M
    URBAN_DYN_KUSAKA01_GRIDDED_Z0H_IN_FILENAME character(len=H_LONG) '' gridded data of Z0H

  • PARAM_URBAN_DATA
    nametypedefault valuecomment
    ZR real(RP) 10.0_RP roof level (building height) [m]
    ROOF_WIDTH real(RP) 9.0_RP roof width [m]
    ROAD_WIDTH real(RP) 11.0_RP road width [m]
    SIGMA_ZED real(RP) 1.0_RP Standard deviation of roof height [m]
    AH_TBL real(RP) 17.5_RP Sensible Anthropogenic heat from urban subgrid [W/m^2]
    AHL_TBL real(RP) 0.0_RP Latent Anthropogenic heat from urban subgrid [W/m^2]
    BETR real(RP) 0.0_RP Evaporation efficiency of roof [-]
    BETB real(RP) 0.0_RP of building [-]
    BETG real(RP) 0.0_RP of ground [-]
    STRGR real(RP) 0.0_RP rain strage on roof [-]
    STRGB real(RP) 0.0_RP on wall [-]
    STRGG real(RP) 0.0_RP on ground [-]
    CAPR real(RP) 1.2E6_RP heat capacity of roof [J m-3 K]
    CAPB real(RP) 1.2E6_RP of wall [J m-3 K]
    CAPG real(RP) 1.2E6_RP of ground [J m-3 K]
    AKSR real(RP) 2.28_RP thermal conductivity of roof [W m-1 K]
    AKSB real(RP) 2.28_RP of wall [W m-1 K]
    AKSG real(RP) 2.28_RP of ground [W m-1 K]
    ALBR real(RP) 0.2_RP surface albedo of roof
    ALBB real(RP) 0.2_RP surface albedo of wall
    ALBG real(RP) 0.2_RP surface albedo of ground
    EPSR real(RP) 0.90_RP Surface emissivity of roof
    EPSB real(RP) 0.90_RP Surface emissivity of wall
    EPSG real(RP) 0.90_RP Surface emissivity of ground
    Z0R real(RP) 0.01_RP roughness length for momentum of building roof
    Z0B real(RP) 0.0001_RP roughness length for momentum of building wall
    Z0G real(RP) 0.01_RP roughness length for momentum of ground
    TRLEND real(RP) 293.00_RP lower boundary condition of roof temperature [K]
    TBLEND real(RP) 293.00_RP lower boundary condition of wall temperature [K]
    TGLEND real(RP) 293.00_RP lower boundary condition of ground temperature [K]

History Output
namedescriptionunitvariable
URBAN_GHB urban ground heat flux on wall W/m2 URBAN_GHB
URBAN_GHG urban ground heat flux on road W/m2 URBAN_GHG
URBAN_GHR urban ground heat flux on roof W/m2 URBAN_GHR
URBAN_LHB urban latent heat flux on wall W/m2 URBAN_LHB
URBAN_LHG urban latent heat flux on road W/m2 URBAN_LHG
URBAN_LHR urban latent heat flux on roof W/m2 URBAN_LHR
URBAN_RNB urban net radiation on wall W/m2 URBAN_RNB
URBAN_RNG urban net radiation on road W/m2 URBAN_RNG
URBAN_RNR urban net radiation on roof W/m2 URBAN_RNR
URBAN_RNgrd urban grid average of net radiation W/m2 URBAN_RNgrd
URBAN_SHB urban sensible heat flux on wall W/m2 URBAN_SHB
URBAN_SHG urban sensible heat flux on road W/m2 URBAN_SHG
URBAN_SHR urban sensible heat flux on roof W/m2 URBAN_SHR

Function/Subroutine Documentation

◆ urban_dyn_kusaka01_setup()

subroutine, public scale_urban_dyn_kusaka01::urban_dyn_kusaka01_setup ( integer, intent(in)  UIA,
integer, intent(in)  UIS,
integer, intent(in)  UIE,
integer, intent(in)  UJA,
integer, intent(in)  UJS,
integer, intent(in)  UJE,
real(rp), dimension(uia,uja), intent(in)  fact_urban,
real(rp), dimension(uia,uja), intent(out)  Z0M,
real(rp), dimension(uia,uja), intent(out)  Z0H,
real(rp), dimension(uia,uja), intent(out)  Z0E,
real(rp), dimension (uia,uja), intent(out)  ZD,
real(rp), dimension (uia,uja,1:24), intent(out)  AH_URB,
real(rp), dimension (uia,uja,1:24), intent(out)  AHL_URB 
)

Setup.

Definition at line 125 of file scale_urban_dyn_kusaka01.F90.

125  use scale_prc, only: &
126  prc_myrank, &
127  prc_abort
128  use scale_const, only: &
129  undef => const_undef
130  use scale_file_history, only: &
132  implicit none
133 
134  integer, intent(in) :: UIA, UIS, UIE
135  integer, intent(in) :: UJA, UJS, UJE
136  real(RP), intent(in) :: fact_urban(UIA,UJA)
137  real(RP), intent(out) :: Z0M(UIA,UJA)
138  real(RP), intent(out) :: Z0H(UIA,UJA)
139  real(RP), intent(out) :: Z0E(UIA,UJA)
140  real(RP), intent(out) :: ZD (UIA,UJA)
141  real(RP), intent(out) :: AH_URB (UIA,UJA,1:24)
142  real(RP), intent(out) :: AHL_URB (UIA,UJA,1:24)
143 
144  character(len=H_LONG) :: URBAN_DYN_KUSAKA01_PARAM_IN_FILENAME = ''
145  character(len=H_LONG) :: URBAN_DYN_KUSAKA01_GRIDDED_Z0M_IN_FILENAME = ''
146  character(len=H_LONG) :: URBAN_DYN_KUSAKA01_GRIDDED_Z0M_IN_VARNAME = 'URBAN_Z0M'
147  character(len=H_LONG) :: URBAN_DYN_KUSAKA01_GRIDDED_Z0H_IN_FILENAME = ''
148  character(len=H_LONG) :: URBAN_DYN_KUSAKA01_GRIDDED_Z0H_IN_VARNAME = 'URBAN_Z0H'
149  !character(len=H_LONG) :: URBAN_DYN_KUSAKA01_GRIDDED_ZD_IN_FILENAME = '' !< gridded data of ZD
150  !character(len=H_LONG) :: URBAN_DYN_KUSAKA01_GRIDDED_ZD_IN_VARNAME = 'URBAN_ZD' !< var name of gridded data for Zd
151  character(len=H_LONG) :: URBAN_DYN_KUSAKA01_GRIDDED_AH_IN_FILENAME = ''
152  character(len=H_LONG) :: URBAN_DYN_KUSAKA01_GRIDDED_AH_IN_VARNAME = 'URBAN_AH'
153  character(len=H_LONG) :: URBAN_DYN_KUSAKA01_GRIDDED_AHL_IN_FILENAME = ''
154  character(len=H_LONG) :: URBAN_DYN_KUSAKA01_GRIDDED_AHL_IN_VARNAME = 'URBAN_AHL'
155 
156  namelist / param_urban_dyn_kusaka01 / &
157  dts_max, &
158  bound, &
159  urban_dyn_kusaka01_param_in_filename, &
160  urban_dyn_kusaka01_gridded_z0m_in_filename, &
161  urban_dyn_kusaka01_gridded_z0h_in_filename, &
162  !URBAN_DYN_KUSAKA01_GRIDDED_ZD_IN_FILENAME, &
163  urban_dyn_kusaka01_gridded_ah_in_filename, &
164  urban_dyn_kusaka01_gridded_ahl_in_filename
165 
166  real(RP) :: udata(UIA,UJA)
167  real(RP) :: udata2(UIA,UJA,24)
168 
169  integer :: i, j, k
170  integer :: ierr
171  !---------------------------------------------------------------------------
172 
173  log_newline
174  log_info("URBAN_DYN_kusaka01_setup",*) 'Setup'
175 
176  !--- read namelist
177  rewind(io_fid_conf)
178  read(io_fid_conf,nml=param_urban_dyn_kusaka01,iostat=ierr)
179  if( ierr < 0 ) then !--- missing
180  log_info("URBAN_DYN_kusaka01_setup",*) 'Not found namelist. Default used.'
181  elseif( ierr > 0 ) then !--- fatal error
182  log_error("URBAN_DYN_kusaka01_setup",*) 'Not appropriate names in namelist PARAM_URBAN_DYN_KUSAKA01. Check!'
183  call prc_abort
184  endif
185  log_nml(param_urban_dyn_kusaka01)
186 
187  !-- read urban parameter from file
188  if( urban_dyn_kusaka01_param_in_filename /= '' ) then
189  call read_urban_param_table( trim(urban_dyn_kusaka01_param_in_filename) )
190  endif
191 
192  ! set other urban parameters
193  call urban_param_setup
194 
195  ahdiurnal(:) = (/ 0.356, 0.274, 0.232, 0.251, 0.375, 0.647, 0.919, 1.135, 1.249, 1.328, &
196  1.365, 1.363, 1.375, 1.404, 1.457, 1.526, 1.557, 1.521, 1.372, 1.206, &
197  1.017, 0.876, 0.684, 0.512 /)
198 
199  do j = ujs, uje
200  do i = uis, uie
201  z0m(i,j) = z0c_tbl
202  z0h(i,j) = z0hc_tbl
203  z0e(i,j) = z0hc_tbl
204  zd(i,j) = zdc_tbl
205  do k = 1, 24
206  ah_urb(i,j,k) = ah_tbl * ahdiurnal(k) * fact_urban(i,j)
207  ahl_urb(i,j,k) = ahl_tbl * ahdiurnal(k) * fact_urban(i,j)
208  enddo
209  enddo
210  enddo
211 
212  !-- read gridded Z0M data from a file
213  if( urban_dyn_kusaka01_gridded_z0m_in_filename /= '' ) then
214  udata = 0.0_rp
215  call read_urban_gridded_data_2d( &
216  uia, uja, &
217  urban_dyn_kusaka01_gridded_z0m_in_filename, &
218  urban_dyn_kusaka01_gridded_z0m_in_varname, &
219  udata )
220 
221  ! replace to gridded data
222  do j = ujs, uje
223  do i = uis, uie
224  if( udata(i,j) /= undef )then
225  if ( udata(i,j) > 0.0_rp ) then
226  z0m(i,j) = udata(i,j)
227  else if ( udata(i,j) < 0.0_rp ) then
228  log_error("URBAN_DYN_kusaka01_setup",*) 'Gridded Z0M data includes data less than 0. Please check data!',i,j
229  call prc_abort
230  else ! Z0M = 0[m]
231  log_warn("URBAN_DYN_kusaka01_setup",*) 'Gridded Z0M data includes 0; default or table value is used to avoid zero division',prc_myrank,i,j
232  endif
233  endif
234  enddo
235  enddo
236  endif
237 
238  !-- read gridded Z0H & Z0E data from a file
239  if( urban_dyn_kusaka01_gridded_z0h_in_filename /= '' ) then
240  udata = 0.0_rp
241  call read_urban_gridded_data_2d( &
242  uia, uja, &
243  urban_dyn_kusaka01_gridded_z0h_in_filename, &
244  urban_dyn_kusaka01_gridded_z0h_in_varname, &
245  udata )
246 
247  ! replace to gridded data
248  do j = ujs, uje
249  do i = uis, uie
250  if( udata(i,j) /= undef )then
251  if ( udata(i,j) > 0.0_rp ) then
252  z0h(i,j) = udata(i,j)
253  z0e(i,j) = udata(i,j)
254  else if ( udata(i,j) < 0.0_rp ) then
255  log_error("URBAN_DYN_kusaka01_setup",*) 'Gridded Z0H data includes data less than 0. Please check data!',i,j
256  call prc_abort
257  else ! Z0H = 0[m]
258  log_warn("URBAN_DYN_kusaka01_setup",*) 'Gridded Z0H data includes 0; default or table value is used to avoid zero division',prc_myrank,i,j
259  endif
260  endif
261  enddo
262  enddo
263  endif
264 
265  ! currently NOT USED
266  !-- read gridded ZD data from a file
267  !if( URBAN_DYN_KUSAKA01_GRIDDED_ZD_IN_FILENAME /= '' ) then
268  ! udata = 0.0_RP
269  ! call read_urban_gridded_data_2D( &
270  ! UIA, UJA, &
271  ! URBAN_DYN_KUSAKA01_GRIDDED_ZD_IN_FILENAME, &
272  ! URBAN_DYN_KUSAKA01_GRIDDED_ZD_IN_VARNAME, &
273  ! udata )
274  !
275  ! ! replace to gridded data
276  ! do j = UJS, UJE
277  ! do i = UIS, UIE
278  ! if( udata(i,j) /= UNDEF )then
279  ! if ( udata(i,j) >= 0.0_RP ) then
280  ! ZD(i,j) = udata(i,j)
281  ! else
282  ! LOG_ERROR("URBAN_DYN_kusaka01_setup",*) 'Gridded ZD data includes data less than 0. Please check data!',i,j
283  ! call PRC_abort
284  ! endif
285  ! endif
286  ! enddo
287  ! enddo
288  !endif
289 
290  !-- read gridded AH data from a file
291  if( urban_dyn_kusaka01_gridded_ah_in_filename /= '' ) then
292  udata2 = 0.0_rp
293  call read_urban_gridded_data_3d( &
294  uia, uja, &
295  urban_dyn_kusaka01_gridded_ah_in_filename, &
296  urban_dyn_kusaka01_gridded_ah_in_varname, &
297  udata2 )
298 
299  ! replace to gridded data
300  do k = 1, 24
301  do j = ujs, uje
302  do i = uis, uie
303  if( udata2(i,j,k) /= undef )then
304  ah_urb(i,j,k) = udata2(i,j,k)
305  endif
306  enddo
307  enddo
308  enddo
309  endif
310 
311  !-- read gridded AHL data from a file
312  if( urban_dyn_kusaka01_gridded_ahl_in_filename /= '' ) then
313  udata2 = 0.0_rp
314  call read_urban_gridded_data_3d( &
315  uia, uja, &
316  urban_dyn_kusaka01_gridded_ahl_in_filename, &
317  urban_dyn_kusaka01_gridded_ahl_in_varname, &
318  udata2 )
319 
320  ! replace to gridded data
321  do k = 1, 24
322  do j = ujs, uje
323  do i = uis, uie
324  if( udata2(i,j,k) /= undef )then
325  ahl_urb(i,j,k) = udata2(i,j,k)
326  endif
327  enddo
328  enddo
329  enddo
330  endif
331 
332  call file_history_reg( 'URBAN_SHR', 'urban sensible heat flux on roof', 'W/m2', i_shr , ndims=2 )
333  call file_history_reg( 'URBAN_SHB', 'urban sensible heat flux on wall', 'W/m2', i_shb , ndims=2 )
334  call file_history_reg( 'URBAN_SHG', 'urban sensible heat flux on road', 'W/m2', i_shg , ndims=2 )
335  call file_history_reg( 'URBAN_LHR', 'urban latent heat flux on roof', 'W/m2', i_lhr , ndims=2 )
336  call file_history_reg( 'URBAN_LHB', 'urban latent heat flux on wall', 'W/m2', i_lhb , ndims=2 )
337  call file_history_reg( 'URBAN_LHG', 'urban latent heat flux on road', 'W/m2', i_lhg , ndims=2 )
338  call file_history_reg( 'URBAN_GHR', 'urban ground heat flux on roof', 'W/m2', i_ghr , ndims=2 )
339  call file_history_reg( 'URBAN_GHB', 'urban ground heat flux on wall', 'W/m2', i_ghb , ndims=2 )
340  call file_history_reg( 'URBAN_GHG', 'urban ground heat flux on road', 'W/m2', i_ghg , ndims=2 )
341  call file_history_reg( 'URBAN_RNR', 'urban net radiation on roof', 'W/m2', i_rnr , ndims=2 )
342  call file_history_reg( 'URBAN_RNB', 'urban net radiation on wall', 'W/m2', i_rnb , ndims=2 )
343  call file_history_reg( 'URBAN_RNG', 'urban net radiation on road', 'W/m2', i_rng , ndims=2 )
344  call file_history_reg( 'URBAN_RNgrd', 'urban grid average of net radiation', 'W/m2', i_rngrd, ndims=2 )
345 
346  return

References scale_const::const_undef, scale_file_history::file_history_reg(), scale_io::io_fid_conf, scale_prc::prc_abort(), and scale_prc::prc_myrank.

Referenced by mod_urban_driver::urban_driver_setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urban_dyn_kusaka01()

subroutine, public scale_urban_dyn_kusaka01::urban_dyn_kusaka01 ( integer, intent(in)  UKA,
integer, intent(in)  UKS,
integer, intent(in)  UKE,
integer, intent(in)  UIA,
integer, intent(in)  UIS,
integer, intent(in)  UIE,
integer, intent(in)  UJA,
integer, intent(in)  UJS,
integer, intent(in)  UJE,
real(rp), dimension(uia,uja), intent(in)  TMPA,
real(rp), dimension(uia,uja), intent(in)  PRSA,
real(rp), dimension (uia,uja), intent(in)  U1,
real(rp), dimension (uia,uja), intent(in)  V1,
real(rp), dimension(uia,uja), intent(in)  DENS,
real(rp), dimension (uia,uja), intent(in)  QA,
real(rp), dimension (uia,uja), intent(in)  LHV,
real(rp), dimension (uia,uja), intent(in)  Z1,
real(rp), dimension (uia,uja), intent(in)  PBL,
real(rp), dimension(uia,uja), intent(in)  RHOS,
real(rp), dimension(uia,uja), intent(in)  PRSS,
real(rp), dimension (uia,uja,2), intent(in)  LWD,
real(rp), dimension (uia,uja,2), intent(in)  SWD,
real(rp), dimension(uia,uja), intent(in)  RAIN,
real(rp), dimension(uia,uja), intent(in)  EFLX,
real(rp), dimension (uia,uja), intent(in)  Z0M,
real(rp), dimension (uia,uja), intent(in)  Z0H,
real(rp), dimension (uia,uja), intent(in)  Z0E,
real(rp), dimension (uia,uja), intent(in)  ZD,
real(rp), dimension(uka), intent(in)  CDZ,
real(rp), dimension(uia,uja), intent(in)  TanSL_X,
real(rp), dimension(uia,uja), intent(in)  TanSL_Y,
real(rp), dimension(uia,uja), intent(in)  fact_urban,
real(dp), intent(in)  dt,
real(rp), dimension (uks:uke,uia,uja), intent(inout)  TRL_URB,
real(rp), dimension (uks:uke,uia,uja), intent(inout)  TBL_URB,
real(rp), dimension (uks:uke,uia,uja), intent(inout)  TGL_URB,
real(rp), dimension (uia,uja), intent(inout)  TR_URB,
real(rp), dimension (uia,uja), intent(inout)  TB_URB,
real(rp), dimension (uia,uja), intent(inout)  TG_URB,
real(rp), dimension (uia,uja), intent(inout)  TC_URB,
real(rp), dimension (uia,uja), intent(inout)  QC_URB,
real(rp), dimension (uia,uja), intent(inout)  UC_URB,
real(rp), dimension(uia,uja), intent(inout)  RAINR_URB,
real(rp), dimension(uia,uja), intent(inout)  RAINB_URB,
real(rp), dimension(uia,uja), intent(inout)  RAING_URB,
real(rp), dimension (uia,uja), intent(out)  ROFF_URB,
real(rp), dimension(uia,uja), intent(out)  SFC_TEMP,
real(rp), dimension (uia,uja,n_rad_dir,n_rad_rgn), intent(out)  ALBEDO,
real(rp), dimension (uia,uja), intent(out)  MWFLX,
real(rp), dimension (uia,uja), intent(out)  MUFLX,
real(rp), dimension (uia,uja), intent(out)  MVFLX,
real(rp), dimension (uia,uja), intent(out)  SHFLX,
real(rp), dimension (uia,uja), intent(out)  LHFLX,
real(rp), dimension (uia,uja), intent(out)  GHFLX,
real(rp), dimension (uia,uja), intent(out)  Ustar,
real(rp), dimension (uia,uja), intent(out)  Tstar,
real(rp), dimension (uia,uja), intent(out)  Qstar,
real(rp), dimension (uia,uja), intent(out)  Wstar,
real(rp), dimension (uia,uja), intent(out)  RLmo,
real(rp), dimension (uia,uja), intent(out)  U10,
real(rp), dimension (uia,uja), intent(out)  V10,
real(rp), dimension (uia,uja), intent(out)  T2,
real(rp), dimension (uia,uja), intent(out)  Q2 
)

Main routine for land submodel.

Definition at line 379 of file scale_urban_dyn_kusaka01.F90.

379  use scale_const, only: &
380  eps => const_eps, &
381  undef => const_undef, &
382  rdry => const_rdry, &
383  rvap => const_rvap
384  use scale_atmos_saturation, only: &
385  qsat => atmos_saturation_dens2qsat_all
386 ! qsat => ATMOS_SATURATION_pres2qsat_all
387  use scale_bulkflux, only: &
388  bulkflux
389  implicit none
390  integer, intent(in) :: UKA, UKS, UKE
391  integer, intent(in) :: UIA, UIS, UIE
392  integer, intent(in) :: UJA, UJS, UJE
393 
394  real(RP), intent(in) :: TMPA(UIA,UJA)
395  real(RP), intent(in) :: PRSA(UIA,UJA)
396  real(RP), intent(in) :: U1 (UIA,UJA)
397  real(RP), intent(in) :: V1 (UIA,UJA)
398  real(RP), intent(in) :: DENS(UIA,UJA)
399  real(RP), intent(in) :: QA (UIA,UJA)
400  real(RP), intent(in) :: LHV (UIA,UJA)
401  real(RP), intent(in) :: Z1 (UIA,UJA)
402  real(RP), intent(in) :: PBL (UIA,UJA)
403  real(RP), intent(in) :: RHOS(UIA,UJA) ! density at the surface [kg/m3]
404  real(RP), intent(in) :: PRSS(UIA,UJA)
405  real(RP), intent(in) :: LWD (UIA,UJA,2)
406  real(RP), intent(in) :: SWD (UIA,UJA,2)
407  real(RP), intent(in) :: RAIN(UIA,UJA)
408  real(RP), intent(in) :: EFLX(UIA,UJA)
409  real(RP), intent(in) :: Z0M (UIA,UJA)
410  real(RP), intent(in) :: Z0H (UIA,UJA)
411  real(RP), intent(in) :: Z0E (UIA,UJA)
412  real(RP), intent(in) :: ZD (UIA,UJA)
413  real(RP), intent(in) :: CDZ(UKA)
414  real(RP), intent(in) :: TanSL_X(UIA,UJA)
415  real(RP), intent(in) :: TanSL_Y(UIA,UJA)
416  real(RP), intent(in) :: fact_urban(UIA,UJA)
417  real(DP), intent(in) :: dt
418 
419  real(RP), intent(inout) :: TR_URB (UIA,UJA)
420  real(RP), intent(inout) :: TB_URB (UIA,UJA)
421  real(RP), intent(inout) :: TG_URB (UIA,UJA)
422  real(RP), intent(inout) :: TC_URB (UIA,UJA)
423  real(RP), intent(inout) :: QC_URB (UIA,UJA)
424  real(RP), intent(inout) :: UC_URB (UIA,UJA)
425  real(RP), intent(inout) :: TRL_URB (UKS:UKE,UIA,UJA)
426  real(RP), intent(inout) :: TBL_URB (UKS:UKE,UIA,UJA)
427  real(RP), intent(inout) :: TGL_URB (UKS:UKE,UIA,UJA)
428  real(RP), intent(inout) :: RAINR_URB(UIA,UJA)
429  real(RP), intent(inout) :: RAINB_URB(UIA,UJA)
430  real(RP), intent(inout) :: RAING_URB(UIA,UJA)
431  real(RP), intent(out) :: ROFF_URB (UIA,UJA)
432 
433  real(RP), intent(out) :: SFC_TEMP(UIA,UJA)
434  real(RP), intent(out) :: ALBEDO (UIA,UJA,N_RAD_DIR,N_RAD_RGN)
435  real(RP), intent(out) :: MWFLX (UIA,UJA)
436  real(RP), intent(out) :: MUFLX (UIA,UJA)
437  real(RP), intent(out) :: MVFLX (UIA,UJA)
438  real(RP), intent(out) :: SHFLX (UIA,UJA)
439  real(RP), intent(out) :: LHFLX (UIA,UJA)
440  real(RP), intent(out) :: GHFLX (UIA,UJA)
441  real(RP), intent(out) :: Ustar (UIA,UJA)
442  real(RP), intent(out) :: Tstar (UIA,UJA)
443  real(RP), intent(out) :: Qstar (UIA,UJA)
444  real(RP), intent(out) :: Wstar (UIA,UJA)
445  real(RP), intent(out) :: RLmo (UIA,UJA)
446  real(RP), intent(out) :: U10 (UIA,UJA)
447  real(RP), intent(out) :: V10 (UIA,UJA)
448  real(RP), intent(out) :: T2 (UIA,UJA)
449  real(RP), intent(out) :: Q2 (UIA,UJA)
450 
451 
452  ! parameter
453  logical, parameter :: LSOLAR = .false. ! [true=both, false=SSG only]
454 
455  real(RP), parameter :: Uabs_min = 0.1_rp
456 
457  ! work
458  real(RP) :: TR
459  real(RP) :: TB
460  real(RP) :: TG
461  real(RP) :: TC
462  real(RP) :: QC
463  real(RP) :: UC
464  real(RP) :: TRL(UKS:UKE)
465  real(RP) :: TBL(UKS:UKE)
466  real(RP) :: TGL(UKS:UKE)
467  real(RP) :: RAINR
468  real(RP) :: RAINB
469  real(RP) :: RAING
470  real(RP) :: ALBD_LW
471  real(RP) :: ALBD_SW
472 
473  real(RP) :: SHR (UIA,UJA)
474  real(RP) :: SHB (UIA,UJA)
475  real(RP) :: SHG (UIA,UJA)
476  real(RP) :: LHR (UIA,UJA)
477  real(RP) :: LHB (UIA,UJA)
478  real(RP) :: LHG (UIA,UJA)
479  real(RP) :: GHR (UIA,UJA)
480  real(RP) :: GHB (UIA,UJA)
481  real(RP) :: GHG (UIA,UJA)
482  real(RP) :: RNR (UIA,UJA)
483  real(RP) :: RNB (UIA,UJA)
484  real(RP) :: RNG (UIA,UJA)
485  real(RP) :: RNgrd(UIA,UJA)
486 
487  real(RP) :: DZR(UKA) ! thickness of each roof layer [m]
488  real(RP) :: DZB(UKA) ! thickness of each building layer [m]
489  real(RP) :: DZG(UKA) ! thickness of each road layer [m]
490 
491 
492  real(RP) :: Uabs ! modified absolute velocity [m/s]
493  real(RP) :: Ra ! Aerodynamic resistance (=1/Ce) [1/s]
494 
495  real(RP) :: QVsat ! saturation water vapor mixing ratio at surface [kg/kg]
496  real(RP) :: Rtot ! total gas constant
497  real(RP) :: qdry ! dry air mass ratio [kg/kg]
498 
499  real(RP) :: FracU10 ! calculation parameter for U10 [-]
500  real(RP) :: FracT2 ! calculation parameter for T2 [-]
501  real(RP) :: FracQ2 ! calculation parameter for Q2 [-]
502 
503  real(RP) :: MFLUX
504  real(RP) :: w
505 
506  integer :: k, i, j
507  !---------------------------------------------------------------------------
508 
509  log_progress(*) 'urban / dynamics / Kusaka01'
510 
511  dzr(:) = cdz(:)
512  dzb(:) = cdz(:)
513  dzg(:) = cdz(:)
514 
515  do j = ujs, uje
516  do i = uis, uie
517 
518  if( fact_urban(i,j) > 0.0_rp ) then
519 
520 ! qdry = 1.0_RP - QA(i,j)
521 ! Rtot = qdry * Rdry + QA(i,j) * Rvap
522 
523  w = u1(i,j) * tansl_x(i,j) + v1(i,j) * tansl_y(i,j)
524  uabs = sqrt( u1(i,j)**2 + v1(i,j)**2 + w**2 )
525 
526  ! save
527  tr = tr_urb(i,j)
528  tb = tb_urb(i,j)
529  tg = tg_urb(i,j)
530  tc = tc_urb(i,j)
531  qc = qc_urb(i,j)
532  uc = uc_urb(i,j)
533 
534  do k = uks, uke
535  trl(k) = trl_urb(k,i,j)
536  tbl(k) = tbl_urb(k,i,j)
537  tgl(k) = tgl_urb(k,i,j)
538  end do
539 
540  rainr = rainr_urb(i,j)
541  rainb = rainb_urb(i,j)
542  raing = raing_urb(i,j)
543 
544  call slc_main( uka, uks, uke, uia, uis, uie, uja, ujs, uje, &
545  trl(:), & ! [INOUT]
546  tbl(:), & ! [INOUT]
547  tgl(:), & ! [INOUT]
548  tr, & ! [INOUT]
549  tb, & ! [INOUT]
550  tg, & ! [INOUT]
551  tc, & ! [INOUT]
552  qc, & ! [INOUT]
553  uc, & ! [INOUT]
554  rainr, & ! [INOUT]
555  rainb, & ! [INOUT]
556  raing, & ! [INOUT]
557  roff_urb(i,j), & ! [OUT]
558  albd_lw, & ! [OUT]
559  albd_sw, & ! [OUT]
560  shr(i,j), & ! [OUT]
561  shb(i,j), & ! [OUT]
562  shg(i,j), & ! [OUT]
563  lhr(i,j), & ! [OUT]
564  lhb(i,j), & ! [OUT]
565  lhg(i,j), & ! [OUT]
566  ghr(i,j), & ! [OUT]
567  ghb(i,j), & ! [OUT]
568  ghg(i,j), & ! [OUT]
569  rnr(i,j), & ! [OUT]
570  rnb(i,j), & ! [OUT]
571  rng(i,j), & ! [OUT]
572  sfc_temp(i,j), & ! [OUT]
573  rngrd(i,j), & ! [OUT]
574  shflx(i,j), & ! [OUT]
575  lhflx(i,j), & ! [OUT]
576  ghflx(i,j), & ! [OUT]
577  u10(i,j), & ! [OUT]
578  v10(i,j), & ! [OUT]
579  t2(i,j), & ! [OUT]
580  q2(i,j), & ! [OUT]
581  lsolar, & ! [IN]
582  prsa(i,j), & ! [IN]
583  prss(i,j), & ! [IN]
584  tmpa(i,j), & ! [IN]
585  rhos(i,j), & ! [IN]
586  qa(i,j), & ! [IN]
587  uabs, & ! [IN]
588  u1(i,j), & ! [IN]
589  v1(i,j), & ! [IN]
590  lhv(i,j), & ! [IN]
591  z1(i,j), & ! [IN]
592  swd(i,j,:), & ! [IN]
593  lwd(i,j,:), & ! [IN]
594  rain(i,j), & ! [IN]
595  eflx(i,j), & ! [IN]
596  dens(i,j), & ! [IN]
597  z0m(i,j), & ! [IN]
598  z0h(i,j), & ! [IN]
599  zd(i,j), & ! [IN]
600  dzr(:), dzg(:), dzb(:), & ! [IN]
601  dt, & ! [IN]
602  i, j ) ! [IN]
603 
604  ! update
605  tr_urb(i,j) = tr
606  tb_urb(i,j) = tb
607  tg_urb(i,j) = tg
608  tc_urb(i,j) = tc
609  qc_urb(i,j) = qc
610  uc_urb(i,j) = uc
611  do k = uks, uke
612  trl_urb(k,i,j) = trl(k)
613  tbl_urb(k,i,j) = tbl(k)
614  tgl_urb(k,i,j) = tgl(k)
615  end do
616  rainr_urb(i,j) = rainr
617  rainb_urb(i,j) = rainb
618  raing_urb(i,j) = raing
619 
620  albedo(i,j,i_r_direct ,i_r_ir ) = albd_lw
621  albedo(i,j,i_r_diffuse,i_r_ir ) = albd_lw
622  albedo(i,j,i_r_direct ,i_r_nir) = albd_sw
623  albedo(i,j,i_r_diffuse,i_r_nir) = albd_sw
624  albedo(i,j,i_r_direct ,i_r_vis) = albd_sw
625  albedo(i,j,i_r_diffuse,i_r_vis) = albd_sw
626 
627  ! saturation at the surface
628 ! call qsat( SFC_TEMP(i,j), PRSS(i,j), qdry, & ! [IN]
629 ! QVsat ) ! [OUT]
630  call qsat( sfc_temp(i,j), rhos(i,j), & ! [IN]
631  qvsat ) ! [OUT]
632 
633  call bulkflux( tmpa(i,j), sfc_temp(i,j), & ! [IN]
634  prsa(i,j), prss(i,j), & ! [IN]
635  qa(i,j), qvsat, & ! [IN]
636  uabs, z1(i,j), pbl(i,j), & ! [IN]
637  z0m(i,j), z0h(i,j), z0e(i,j), & ! [IN]
638  ustar(i,j), tstar(i,j), qstar(i,j), & ! [OUT]
639  wstar(i,j), rlmo(i,j), ra, & ! [OUT]
640  fracu10, fract2, fracq2 ) ! [OUT]
641 
642  if ( uabs < eps ) then
643  mwflx(i,j) = 0.0_rp
644  muflx(i,j) = 0.0_rp
645  mvflx(i,j) = 0.0_rp
646  else
647  mflux = - rhos(i,j) * ustar(i,j)**2
648  mwflx(i,j) = mflux * w / uabs
649  muflx(i,j) = mflux * u1(i,j) / uabs
650  mvflx(i,j) = mflux * v1(i,j) / uabs
651  end if
652 
653  else
654  sfc_temp(i,j) = undef
655  albedo(i,j,:,:) = undef
656  mwflx(i,j) = undef
657  muflx(i,j) = undef
658  mvflx(i,j) = undef
659  shflx(i,j) = undef
660  lhflx(i,j) = undef
661  ghflx(i,j) = undef
662  ustar(i,j) = undef
663  tstar(i,j) = undef
664  qstar(i,j) = undef
665  wstar(i,j) = undef
666  rlmo(i,j) = undef
667  u10(i,j) = undef
668  v10(i,j) = undef
669  t2(i,j) = undef
670  q2(i,j) = undef
671  shr(i,j) = undef
672  shb(i,j) = undef
673  shg(i,j) = undef
674  lhr(i,j) = undef
675  lhb(i,j) = undef
676  lhg(i,j) = undef
677  ghr(i,j) = undef
678  ghb(i,j) = undef
679  ghg(i,j) = undef
680  rnr(i,j) = undef
681  rnb(i,j) = undef
682  rng(i,j) = undef
683  rngrd(i,j) = undef
684  endif
685 
686  end do
687  end do
688 
689  call put_history( uia, uja, &
690  shr(:,:), shb(:,:), shg(:,:), &
691  lhr(:,:), lhb(:,:), lhg(:,:), &
692  ghr(:,:), ghb(:,:), ghg(:,:), &
693  rnr(:,:), rnb(:,:), rng(:,:), &
694  rngrd(:,:) )
695 
696  return

References scale_bulkflux::bulkflux, scale_const::const_cpdry, scale_const::const_eps, scale_const::const_pi, scale_const::const_rdry, scale_const::const_rvap, scale_const::const_undef, scale_file_cartesc::file_cartesc_close(), scale_file_cartesc::file_cartesc_flush(), scale_file_cartesc::file_cartesc_open(), scale_cpl_sfc_index::i_r_diffuse, scale_cpl_sfc_index::i_r_direct, scale_cpl_sfc_index::i_r_ir, scale_cpl_sfc_index::i_r_nir, scale_cpl_sfc_index::i_r_vis, scale_io::io_get_available_fid(), scale_prc::prc_abort(), scale_prc::prc_myrank, and put_history().

Referenced by mod_urban_driver::urban_driver_calc_tendency().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_history()

subroutine scale_urban_dyn_kusaka01::put_history ( integer, intent(in)  UIA,
integer, intent(in)  UJA,
real(rp), dimension(uia,uja), intent(in)  SHR,
real(rp), dimension(uia,uja), intent(in)  SHB,
real(rp), dimension(uia,uja), intent(in)  SHG,
real(rp), dimension(uia,uja), intent(in)  LHR,
real(rp), dimension(uia,uja), intent(in)  LHB,
real(rp), dimension(uia,uja), intent(in)  LHG,
real(rp), dimension(uia,uja), intent(in)  GHR,
real(rp), dimension(uia,uja), intent(in)  GHB,
real(rp), dimension(uia,uja), intent(in)  GHG,
real(rp), dimension(uia,uja), intent(in)  RNR,
real(rp), dimension(uia,uja), intent(in)  RNB,
real(rp), dimension(uia,uja), intent(in)  RNG,
real(rp), dimension(uia,uja), intent(in)  RNgrd 
)

Definition at line 2071 of file scale_urban_dyn_kusaka01.F90.

2071  use scale_file_history, only: &
2072  file_history_put
2073  integer, intent(in) :: UIA, UJA
2074  real(RP), intent(in) :: SHR(UIA,UJA), SHB(UIA,UJA), SHG(UIA,UJA)
2075  real(RP), intent(in) :: LHR(UIA,UJA), LHB(UIA,UJA), LHG(UIA,UJA)
2076  real(RP), intent(in) :: GHR(UIA,UJA), GHB(UIA,UJA), GHG(UIA,UJA)
2077  real(RP), intent(in) :: RNR(UIA,UJA), RNB(UIA,UJA), RNG(UIA,UJA)
2078  real(RP), intent(in) :: RNgrd(UIA,UJA)
2079 
2080  call file_history_put( i_shr, shr(:,:) )
2081  call file_history_put( i_shb, shb(:,:) )
2082  call file_history_put( i_shg, shg(:,:) )
2083  call file_history_put( i_lhr, lhr(:,:) )
2084  call file_history_put( i_lhb, lhb(:,:) )
2085  call file_history_put( i_lhg, lhg(:,:) )
2086  call file_history_put( i_ghr, ghr(:,:) )
2087  call file_history_put( i_ghb, ghb(:,:) )
2088  call file_history_put( i_ghg, ghg(:,:) )
2089  call file_history_put( i_rnr, rnr(:,:) )
2090  call file_history_put( i_rnb, rnb(:,:) )
2091  call file_history_put( i_rng, rng(:,:) )
2092  call file_history_put( i_rngrd, rngrd(:,:) )
2093 
2094  return

Referenced by urban_dyn_kusaka01().

Here is the caller graph for this function:
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_bulkflux
module Surface bulk flux
Definition: scale_bulkflux.F90:12
scale_file_history
module file_history
Definition: scale_file_history.F90:15
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_file_history::file_history_reg
subroutine, public file_history_reg(name, desc, unit, itemid, standard_name, ndims, dim_type, cell_measures, fill_halo)
Register/Append variable to history file.
Definition: scale_file_history.F90:650
scale_atmos_saturation
module atmosphere / saturation
Definition: scale_atmos_saturation.F90:12