SCALE-RM
mod_urban_vars.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  use scale_debug
22  use scale_tracer
24  !-----------------------------------------------------------------------------
25  implicit none
26  private
27  !-----------------------------------------------------------------------------
28  !
29  !++ Public procedure
30  !
31  public :: urban_vars_setup
32  public :: urban_vars_restart_read
33  public :: urban_vars_restart_write
34  public :: urban_vars_history
35  public :: urban_vars_monitor
36  public :: urban_vars_check
37 
39  public :: urban_vars_restart_open
42  public :: urban_vars_restart_close
43 
44  !-----------------------------------------------------------------------------
45  !
46  !++ Public parameters & variables
47  !
48  logical, public :: urban_restart_output = .false.
49 
50  character(len=H_LONG), public :: urban_restart_in_basename = ''
51  logical, public :: urban_restart_in_aggregate
52  logical, public :: urban_restart_in_postfix_timelabel = .false.
53  character(len=H_LONG), public :: urban_restart_out_basename = ''
54  logical, public :: urban_restart_out_aggregate
55  logical, public :: urban_restart_out_postfix_timelabel = .true.
56  character(len=H_MID), public :: urban_restart_out_title = 'URBAN restart'
57  character(len=H_SHORT), public :: urban_restart_out_dtype = 'DEFAULT'
58 
59  ! prognostic variables
60  real(rp), public, allocatable :: urban_trl (:,:,:) ! urban temperature in layer of roof [K]
61  real(rp), public, allocatable :: urban_tbl (:,:,:) ! urban temperature in layer of wall [K]
62  real(rp), public, allocatable :: urban_tgl (:,:,:) ! urban temperature in layer of road [K]
63  real(rp), public, allocatable :: urban_tr (:,:) ! urban surface temperature of roof [K]
64  real(rp), public, allocatable :: urban_tb (:,:) ! urban surface temperature of wall [K]
65  real(rp), public, allocatable :: urban_tg (:,:) ! urban surface temperature of road [K]
66  real(rp), public, allocatable :: urban_tc (:,:) ! urban canopy air temperature [K]
67  real(rp), public, allocatable :: urban_qc (:,:) ! urban canopy humidity [kg/kg]
68  real(rp), public, allocatable :: urban_uc (:,:) ! urban canopy wind [m/s]
69  real(rp), public, allocatable :: urban_rainr(:,:) ! urban rain storage on roof [mm=kg/m2]
70  real(rp), public, allocatable :: urban_rainb(:,:) ! urban rain storage on wall [mm=kg/m2]
71  real(rp), public, allocatable :: urban_raing(:,:) ! urban rain storage on road [mm=kg/m2]
72 
73  ! for restart
74  real(rp), public, allocatable :: urban_sfc_temp (:,:) ! urban grid average of surface temperature [K]
75  real(rp), public, allocatable :: urban_sfc_albedo(:,:,:,:) ! urban grid average of albedo (direct/diffuse,IR/near-IR/VIS) (0-1)
76 
77  ! tendency variables
78  real(rp), public, allocatable :: urban_trl_t (:,:,:) ! tendency of URBAN_TRL
79  real(rp), public, allocatable :: urban_tbl_t (:,:,:) ! tendency of URBAN_TBL
80  real(rp), public, allocatable :: urban_tgl_t (:,:,:) ! tendency of URBAN_TGL
81  real(rp), public, allocatable :: urban_tc_t (:,:) ! tendency of URBAN_TC
82  real(rp), public, allocatable :: urban_uc_t (:,:) ! tendency of URBAN_UC
83  real(rp), public, allocatable :: urban_qc_t (:,:) ! tendency of URBAN_QC
84  real(rp), public, allocatable :: urban_tr_t (:,:) ! tendency of URBAN_TR
85  real(rp), public, allocatable :: urban_tb_t (:,:) ! tendency of URBAN_TB
86  real(rp), public, allocatable :: urban_tg_t (:,:) ! tendency of URBAN_TG
87  real(rp), public, allocatable :: urban_rainr_t(:,:) ! tendency of URBAN_RAINR
88  real(rp), public, allocatable :: urban_rainb_t(:,:) ! tendency of URBAN_RAINB
89  real(rp), public, allocatable :: urban_raing_t(:,:) ! tendency of URBAN_RAING
90 
91  real(rp), public, allocatable :: urban_roff (:,:) ! urban runoff [mm/s=kg/m2/s]
92 
93  real(rp), public, allocatable :: urban_sflx_mw (:,:) ! urban grid average of w-momentum flux [kg/m2/s]
94  real(rp), public, allocatable :: urban_sflx_mu (:,:) ! urban grid average of u-momentum flux [kg/m2/s]
95  real(rp), public, allocatable :: urban_sflx_mv (:,:) ! urban grid average of v-momentum flux [kg/m2/s]
96  real(rp), public, allocatable :: urban_sflx_sh (:,:) ! urban grid average of sensible heat flux [W/m2]
97  real(rp), public, allocatable :: urban_sflx_lh (:,:) ! urban grid average of latent heat flux [W/m2]
98  real(rp), public, allocatable :: urban_sflx_shex(:,:) ! urban grid average of extera sensible heat flux [W/m2]
99  real(rp), public, allocatable :: urban_sflx_qvex(:,:) ! urban grid average of extera latent heat flux [kg/kg/m2/s]
100  real(rp), public, allocatable :: urban_sflx_qtrc (:,:,:) ! urban grid average of water vapor flux [kg/m2/s]
101  real(rp), public, allocatable :: urban_sflx_gh (:,:) ! urban grid average of ground heat flux [W/m2]
102 
103  ! given 2D variables expressing urban morphology
104  real(rp), public, allocatable :: urban_z0m (:,:) ! urban grid average of rougness length (momentum) [m]
105  real(rp), public, allocatable :: urban_z0h (:,:) ! urban grid average of rougness length (heat) [m]
106  real(rp), public, allocatable :: urban_z0e (:,:) ! urban grid average of rougness length (vapor) [m]
107  real(rp), public, allocatable :: urban_zd (:,:) ! urban grid average of displacement height [m]
108  real(rp), public, allocatable :: urban_ah (:,:) ! urban grid average of anthropogenic sensible heat [W/m2]
109  real(rp), public, allocatable :: urban_ahl (:,:) ! urban grid average of anthropogenic latent heat [W/m2]
110 
111  ! diagnostic variables
112  real(rp), public, allocatable :: urban_ustar(:,:) ! urban grid average of friction velocity [m/s]
113  real(rp), public, allocatable :: urban_tstar(:,:) ! urban grid average of temperature scale [K]
114  real(rp), public, allocatable :: urban_qstar(:,:) ! urban grid average of moisture scale [kg/kg]
115  real(rp), public, allocatable :: urban_wstar(:,:) ! urban grid average of convective velocity scale [m/s]
116  real(rp), public, allocatable :: urban_rlmo (:,:) ! urban grid average of inversed Obukhov length [1/m]
117  real(rp), public, allocatable :: urban_u10 (:,:) ! urban grid average of velocity u at 10m [m/s]
118  real(rp), public, allocatable :: urban_v10 (:,:) ! urban grid average of velocity v at 10m [m/s]
119  real(rp), public, allocatable :: urban_t2 (:,:) ! urban grid average of temperature at 2m [K]
120  real(rp), public, allocatable :: urban_q2 (:,:) ! urban grid average of water vapor at 2m [kg/kg]
121 
122  ! recieved atmospheric variables
123  real(rp), public, allocatable :: atmos_temp (:,:)
124  real(rp), public, allocatable :: atmos_pres (:,:)
125  real(rp), public, allocatable :: atmos_w (:,:)
126  real(rp), public, allocatable :: atmos_u (:,:)
127  real(rp), public, allocatable :: atmos_v (:,:)
128  real(rp), public, allocatable :: atmos_dens (:,:)
129  real(rp), public, allocatable :: atmos_qv (:,:)
130  real(rp), public, allocatable :: atmos_pbl (:,:)
131  real(rp), public, allocatable :: atmos_sfc_dens (:,:)
132  real(rp), public, allocatable :: atmos_sfc_pres (:,:)
133  real(rp), public, allocatable :: atmos_sflx_lw (:,:,:)
134  real(rp), public, allocatable :: atmos_sflx_sw (:,:,:)
135  real(rp), public, allocatable :: atmos_cossza (:,:)
136  real(rp), public, allocatable :: atmos_sflx_water(:,:)
137  real(rp), public, allocatable :: atmos_sflx_engi(:,:)
138 
139  !-----------------------------------------------------------------------------
140  !
141  !++ Private procedure
142  !
143  !-----------------------------------------------------------------------------
144  !
145  !++ Private parameters & variables
146  !
147  logical, private :: urban_vars_checkrange = .false.
148 
149  integer, private, parameter :: vmax = 19
150  integer, private, parameter :: i_trl = 1
151  integer, private, parameter :: i_tbl = 2
152  integer, private, parameter :: i_tgl = 3
153  integer, private, parameter :: i_tr = 4
154  integer, private, parameter :: i_tb = 5
155  integer, private, parameter :: i_tg = 6
156  integer, private, parameter :: i_tc = 7
157  integer, private, parameter :: i_qc = 8
158  integer, private, parameter :: i_uc = 9
159  integer, private, parameter :: i_rainr = 10
160  integer, private, parameter :: i_rainb = 11
161  integer, private, parameter :: i_raing = 12
162  integer, private, parameter :: i_sfc_temp = 13
163  integer, private, parameter :: i_sfc_alb_ir_dir = 14
164  integer, private, parameter :: i_sfc_alb_ir_dif = 15
165  integer, private, parameter :: i_sfc_alb_nir_dir = 16
166  integer, private, parameter :: i_sfc_alb_nir_dif = 17
167  integer, private, parameter :: i_sfc_alb_vis_dir = 18
168  integer, private, parameter :: i_sfc_alb_vis_dif = 19
169 
170  character(len=H_SHORT), private :: var_name(vmax)
171  character(len=H_MID), private :: var_desc(vmax)
172  character(len=H_MID), private :: var_stdn(vmax)
173  character(len=H_SHORT), private :: var_unit(vmax)
174  integer, private :: var_id(vmax)
175  integer, private :: restart_fid = -1 ! file ID
176 
177  data var_name / 'URBAN_TRL', &
178  'URBAN_TBL', &
179  'URBAN_TGL', &
180  'URBAN_TR', &
181  'URBAN_TB', &
182  'URBAN_TG', &
183  'URBAN_TC', &
184  'URBAN_QC', &
185  'URBAN_UC', &
186  'URBAN_RAINR', &
187  'URBAN_RAINB', &
188  'URBAN_RAING', &
189  'URBAN_SFC_TEMP', &
190  'URBAN_SFC_ALB_IR_dir', &
191  'URBAN_SFC_ALB_IR_dif', &
192  'URBAN_SFC_ALB_NIR_dir', &
193  'URBAN_SFC_ALB_NIR_dif', &
194  'URBAN_SFC_ALB_VIS_dir', &
195  'URBAN_SFC_ALB_VIS_dif' /
196 
197  data var_desc / 'urban temperature in layer of roof', &
198  'urban temperature in layer of wall', &
199  'urban temperature in layer of road', &
200  'urban surface temperature of roof', &
201  'urban surface temperature of wall', &
202  'urban surface temperature of road', &
203  'urban canopy air temperature', &
204  'urban canopy humidity', &
205  'urban canopy wind', &
206  'urban rain strage on roof', &
207  'urban rain strage on wall', &
208  'urban rain strage on road', &
209  'urban grid average of temperature', &
210  'urban grid average of albedo for IR (direct)', &
211  'urban grid average of albedo for IR (diffuse)', &
212  'urban grid average of albedo for NIR (direct)', &
213  'urban grid average of albedo for NIR (diffuse)', &
214  'urban grid average of albedo for VIS (direct)', &
215  'urban grid average of albedo for VIS (diffuse)' /
216 
217  data var_stdn / '', &
218  '', &
219  '', &
220  '', &
221  '', &
222  '', &
223  '', &
224  '', &
225  '', &
226  '', &
227  '', &
228  '', &
229  '', &
230  '', &
231  '', &
232  '', &
233  '', &
234  '', &
235  '' /
236 
237  data var_unit / 'K', &
238  'K', &
239  'K', &
240  'K', &
241  'K', &
242  'K', &
243  'K', &
244  'kg/kg', &
245  'm/s', &
246  'kg/m2', &
247  'kg/m2', &
248  'kg/m2', &
249  'K', &
250  '1', &
251  '1', &
252  '1', &
253  '1', &
254  '1', &
255  '1' /
256 
257  logical, private :: urban_restart_in_check_coordinates = .true.
258 
259  ! for monitor
260  integer, parameter :: im_trl = 1
261  integer, parameter :: im_tbl = 2
262  integer, parameter :: im_tgl = 3
263  integer, parameter :: im_tr = 4
264  integer, parameter :: im_tb = 5
265  integer, parameter :: im_tg = 6
266  integer, parameter :: im_tc = 7
267  integer, parameter :: im_uc = 8
268  integer, parameter :: im_qc = 9
269  integer, parameter :: im_rainr = 10
270  integer, parameter :: im_rainb = 11
271  integer, parameter :: im_raing = 12
272  integer, parameter :: im_roff = 13
273  integer, parameter :: im_sfcwr = 14
274  integer, parameter :: im_sfcwb = 15
275  integer, parameter :: im_sfcwg = 16
276  integer, parameter :: im_sfcir = 17
277  integer, parameter :: im_sfcib = 18
278  integer, parameter :: im_sfcig = 19
279  integer, parameter :: im_masflx = 20
280  integer, parameter :: im_engi_s = 21
281  integer, parameter :: im_engi_sr = 22
282  integer, parameter :: im_engi_sb = 23
283  integer, parameter :: im_engi_sg = 24
284  integer, parameter :: im_engi_w = 25
285  integer, parameter :: im_engi_wr = 26
286  integer, parameter :: im_engi_wb = 27
287  integer, parameter :: im_engi_wg = 28
288  integer, parameter :: im_engsfc_ghr = 29
289  integer, parameter :: im_engsfc_ghb = 30
290  integer, parameter :: im_engsfc_ghg = 31
291  integer, parameter :: im_engsfc_eir = 32
292  integer, parameter :: im_engsfc_eib = 33
293  integer, parameter :: im_engsfc_eig = 34
294  integer, parameter :: im_roff_ei = 35
295  integer, parameter :: im_engflx = 36
296  integer, parameter :: im_max = 35
297  integer, private :: monit_id(im_max)
298 
299  !-----------------------------------------------------------------------------
300 contains
301  !-----------------------------------------------------------------------------
303  subroutine urban_vars_setup
304  use scale_prc, only: &
305  prc_abort
306  use scale_const, only: &
307  undef => const_undef
308  use scale_monitor, only: &
310  implicit none
311 
312  namelist / param_urban_vars / &
316  urban_restart_in_check_coordinates, &
323  urban_vars_checkrange
324 
325  integer :: ierr
326  integer :: iv
327  !---------------------------------------------------------------------------
328 
329  log_newline
330  log_info("URBAN_vars_setup",*) 'Setup'
331 
332  allocate( urban_trl(uks:uke,uia,uja) )
333  allocate( urban_tbl(uks:uke,uia,uja) )
334  allocate( urban_tgl(uks:uke,uia,uja) )
335  allocate( urban_tr(uia,uja) )
336  allocate( urban_tb(uia,uja) )
337  allocate( urban_tg(uia,uja) )
338  allocate( urban_tc(uia,uja) )
339  allocate( urban_qc(uia,uja) )
340  allocate( urban_uc(uia,uja) )
341  allocate( urban_rainr(uia,uja) )
342  allocate( urban_rainb(uia,uja) )
343  allocate( urban_raing(uia,uja) )
344  allocate( urban_roff(uia,uja) )
345  urban_trl(:,:,:) = undef
346  urban_tbl(:,:,:) = undef
347  urban_tgl(:,:,:) = undef
348  urban_tr(:,:) = undef
349  urban_tb(:,:) = undef
350  urban_tg(:,:) = undef
351  urban_tc(:,:) = undef
352  urban_qc(:,:) = undef
353  urban_uc(:,:) = undef
354  urban_rainr(:,:) = undef
355  urban_rainb(:,:) = undef
356  urban_raing(:,:) = undef
357  urban_roff(:,:) = undef
358 
359  allocate( urban_sfc_temp(uia,uja) )
361  urban_sfc_temp(:,:) = undef
362  urban_sfc_albedo(:,:,:,:) = undef
363 
364  allocate( urban_tr_t(uia,uja) )
365  allocate( urban_tb_t(uia,uja) )
366  allocate( urban_tg_t(uia,uja) )
367  allocate( urban_tc_t(uia,uja) )
368  allocate( urban_qc_t(uia,uja) )
369  allocate( urban_uc_t(uia,uja) )
370  allocate( urban_trl_t(uks:uke,uia,uja) )
371  allocate( urban_tbl_t(uks:uke,uia,uja) )
372  allocate( urban_tgl_t(uks:uke,uia,uja) )
373  allocate( urban_rainr_t(uia,uja) )
374  allocate( urban_rainb_t(uia,uja) )
375  allocate( urban_raing_t(uia,uja) )
376  urban_tr_t(:,:) = undef
377  urban_tb_t(:,:) = undef
378  urban_tg_t(:,:) = undef
379  urban_tc_t(:,:) = undef
380  urban_qc_t(:,:) = undef
381  urban_uc_t(:,:) = undef
382  urban_trl_t(:,:,:) = undef
383  urban_tbl_t(:,:,:) = undef
384  urban_tgl_t(:,:,:) = undef
385  urban_rainr_t(:,:) = undef
386  urban_rainb_t(:,:) = undef
387  urban_raing_t(:,:) = undef
388 
389  allocate( urban_sflx_mw(uia,uja) )
390  allocate( urban_sflx_mu(uia,uja) )
391  allocate( urban_sflx_mv(uia,uja) )
392  allocate( urban_sflx_sh(uia,uja) )
393  allocate( urban_sflx_lh(uia,uja) )
394  allocate( urban_sflx_shex(uia,uja) )
395  allocate( urban_sflx_qvex(uia,uja) )
396  allocate( urban_sflx_gh(uia,uja) )
397  allocate( urban_sflx_qtrc(uia,uja,qa) )
398  urban_sflx_mw(:,:) = undef
399  urban_sflx_mu(:,:) = undef
400  urban_sflx_mv(:,:) = undef
401  urban_sflx_sh(:,:) = undef
402  urban_sflx_lh(:,:) = undef
403  urban_sflx_shex(:,:) = undef
404  urban_sflx_qvex(:,:) = undef
405  urban_sflx_gh(:,:) = undef
406  urban_sflx_qtrc(:,:,:) = undef
407 
408  allocate( urban_z0m(uia,uja) )
409  allocate( urban_z0h(uia,uja) )
410  allocate( urban_z0e(uia,uja) )
411  allocate( urban_zd(uia,uja) )
412  allocate( urban_ah(uia,uja) )
413  allocate( urban_ahl(uia,uja) )
414  allocate( urban_ustar(uia,uja) )
415  allocate( urban_tstar(uia,uja) )
416  allocate( urban_qstar(uia,uja) )
417  allocate( urban_wstar(uia,uja) )
418  allocate( urban_rlmo(uia,uja) )
419  allocate( urban_u10(uia,uja) )
420  allocate( urban_v10(uia,uja) )
421  allocate( urban_t2(uia,uja) )
422  allocate( urban_q2(uia,uja) )
423  urban_z0m(:,:) = undef
424  urban_z0h(:,:) = undef
425  urban_z0e(:,:) = undef
426  urban_zd(:,:) = undef
427  urban_ah(:,:) = undef
428  urban_ahl(:,:) = undef
429  urban_ustar(:,:) = undef
430  urban_tstar(:,:) = undef
431  urban_qstar(:,:) = undef
432  urban_wstar(:,:) = undef
433  urban_rlmo(:,:) = undef
434  urban_u10(:,:) = undef
435  urban_v10(:,:) = undef
436  urban_t2(:,:) = undef
437  urban_q2(:,:) = undef
438 
439  allocate( atmos_temp(uia,uja) )
440  allocate( atmos_pres(uia,uja) )
441  allocate( atmos_w(uia,uja) )
442  allocate( atmos_u(uia,uja) )
443  allocate( atmos_v(uia,uja) )
444  allocate( atmos_dens(uia,uja) )
445  allocate( atmos_qv(uia,uja) )
446  allocate( atmos_pbl(uia,uja) )
447  allocate( atmos_sfc_dens(uia,uja) )
448  allocate( atmos_sfc_pres(uia,uja) )
449  allocate( atmos_sflx_lw(uia,uja,2) )
450  allocate( atmos_sflx_sw(uia,uja,2) )
451  allocate( atmos_cossza(uia,uja) )
452  allocate( atmos_sflx_water(uia,uja) )
453  allocate( atmos_sflx_engi(uia,uja) )
454  atmos_temp(:,:) = undef
455  atmos_pres(:,:) = undef
456  atmos_w(:,:) = undef
457  atmos_u(:,:) = undef
458  atmos_v(:,:) = undef
459  atmos_dens(:,:) = undef
460  atmos_qv(:,:) = undef
461  atmos_pbl(:,:) = undef
462  atmos_sfc_dens(:,:) = undef
463  atmos_sfc_pres(:,:) = undef
464  atmos_sflx_lw(:,:,:) = undef
465  atmos_sflx_sw(:,:,:) = undef
466  atmos_cossza(:,:) = undef
467  atmos_sflx_water(:,:) = undef
468  atmos_sflx_engi(:,:) = undef
469 
470  !--- read namelist
471  rewind(io_fid_conf)
472  read(io_fid_conf,nml=param_urban_vars,iostat=ierr)
473  if( ierr < 0 ) then !--- missing
474  log_info("URBAN_vars_setup",*) 'Not found namelist. Default used.'
475  elseif( ierr > 0 ) then !--- fatal error
476  log_error("URBAN_vars_setup",*) 'Not appropriate names in namelist PARAM_URBAN_VARS. Check!'
477  call prc_abort
478  endif
479  log_nml(param_urban_vars)
480 
481  log_newline
482  log_info("URBAN_vars_setup",*) 'List of prognostic variables (URBAN) '
483  log_info_cont('(1x,A,A24,A,A48,A,A12,A)') &
484  ' |', 'VARNAME ','|', &
485  'DESCRIPTION ', '[', 'UNIT ', ']'
486  do iv = 1, vmax
487  log_info_cont('(1x,A,I3,A,A24,A,A48,A,A12,A)') &
488  'NO.',iv,'|',var_name(iv),'|',var_desc(iv),'[',var_unit(iv),']'
489  enddo
490 
491  log_newline
492  if ( urban_restart_in_basename /= '' ) then
493  log_info("URBAN_vars_setup",*) 'Restart input? : YES, file = ', trim(urban_restart_in_basename)
494  log_info("URBAN_vars_setup",*) 'Add timelabel? : ', urban_restart_in_postfix_timelabel
495  else
496  log_info("URBAN_vars_setup",*) 'Restart input? : NO'
497  endif
498  if ( urban_restart_output &
499  .AND. urban_restart_out_basename /= '' ) then
500  log_info("URBAN_vars_setup",*) 'Restart output? : YES, file = ', trim(urban_restart_out_basename)
501  log_info("URBAN_vars_setup",*) 'Add timelabel? : ', urban_restart_out_postfix_timelabel
502  else
503  log_info("URBAN_vars_setup",*) 'Restart output? : NO'
504  urban_restart_output = .false.
505  endif
506 
507  ! monitor
508  call monitor_reg( 'URB_TRL', 'roof temperature', 'K m3', & ! (in)
509  monit_id(im_trl), & ! (out)
510  dim_type='UXY', is_tendency=.false. ) ! (in)
511  call monitor_reg( 'URB_TBL', 'wall temperature', 'K m3', & ! (in)
512  monit_id(im_tbl), & ! (out)
513  dim_type='UXY', is_tendency=.false. ) ! (in)
514  call monitor_reg( 'URB_TGL', 'road temperature', 'K m3', & ! (in)
515  monit_id(im_tgl), & ! (out)
516  dim_type='UXY', is_tendency=.false. ) ! (in)
517  call monitor_reg( 'URB_TR', 'roof surface temperature', 'K m2', & ! (in)
518  monit_id(im_tr), & ! (out)
519  dim_type='XY', is_tendency=.false. ) ! (in)
520  call monitor_reg( 'URB_TB', 'wall surface temperature', 'K m2', & ! (in)
521  monit_id(im_tb), & ! (out)
522  dim_type='XY', is_tendency=.false. ) ! (in)
523  call monitor_reg( 'URB_TG', 'road surface temperature', 'K m2', & ! (in)
524  monit_id(im_tg), & ! (out)
525  dim_type='XY', is_tendency=.false. ) ! (in)
526  call monitor_reg( 'URB_TC', 'canopy temperature', 'K m2', & ! (in)
527  monit_id(im_tc), & ! (out)
528  dim_type='XY', is_tendency=.false. ) ! (in)
529  call monitor_reg( 'URB_UC', 'canopy wind speed', 'm3/s', & ! (in)
530  monit_id(im_uc), & ! (out)
531  dim_type='XY', is_tendency=.false. ) ! (in)
532  call monitor_reg( 'URB_QC', 'canopy humidity', 'kg/m', & ! (in)
533  monit_id(im_qc), & ! (out)
534  dim_type='XY', is_tendency=.false. ) ! (in)
535  call monitor_reg( 'URB_RAINR', 'roof water', 'kg', & ! (in)
536  monit_id(im_rainr), & ! (out)
537  dim_type='XY', is_tendency=.false. ) ! (in)
538  call monitor_reg( 'URB_RAINB', 'wall water', 'kg', & ! (in)
539  monit_id(im_rainb), & ! (out)
540  dim_type='XY', is_tendency=.false. ) ! (in)
541  call monitor_reg( 'URB_RAING', 'road water', 'kg', & ! (in)
542  monit_id(im_raing), & ! (out)
543  dim_type='XY', is_tendency=.false. ) ! (in)
544  call monitor_reg( 'URB_ROFF', 'runoff water', 'kg', & ! (in)
545  monit_id(im_roff), & ! (out)
546  dim_type='XY', is_tendency=.false. ) ! (in)
547 
548  return
549  end subroutine urban_vars_setup
550 
551  !-----------------------------------------------------------------------------
553  subroutine urban_vars_restart_open
554  use scale_time, only: &
556  use scale_file_cartesc, only: &
558  file_cartesc_check_coordinates
559  use mod_urban_admin, only: &
560  urban_do
561  implicit none
562 
563  character(len=19) :: timelabel
564  character(len=H_LONG) :: basename
565  !---------------------------------------------------------------------------
566 
567  log_newline
568  log_info("URBAN_vars_restart_open",*) 'Open restart file (URBAN) '
569 
570  if ( urban_do .and. urban_restart_in_basename /= '' ) then
571 
573  call time_gettimelabel( timelabel )
574  basename = trim(urban_restart_in_basename)//'_'//trim(timelabel)
575  else
576  basename = trim(urban_restart_in_basename)
577  endif
578 
579  log_info("URBAN_vars_restart_open",*) 'basename: ', trim(basename)
580 
581  call file_cartesc_open( basename, restart_fid, aggregate=urban_restart_in_aggregate )
582 
583  if ( urban_restart_in_check_coordinates ) then
584  call file_cartesc_check_coordinates( restart_fid, urban=.true. )
585  end if
586 
587  else
588  log_info("URBAN_vars_restart_open",*) 'restart file for urban is not specified.'
589  endif
590 
591  return
592  end subroutine urban_vars_restart_open
593 
594  !-----------------------------------------------------------------------------
596  subroutine urban_vars_restart_read
597  use scale_prc, only: &
598  prc_abort
599  use scale_file, only: &
601  use scale_file_cartesc, only: &
602  file_cartesc_read, &
604  implicit none
605  !---------------------------------------------------------------------------
606 
607  if ( restart_fid /= -1 ) then
608  log_newline
609  log_info("URBAN_vars_restart_read",*) 'Read from restart file (URBAN) '
610 
611  call file_cartesc_read( restart_fid, var_name(i_trl), 'UXY', & ! [IN]
612  urban_trl(:,:,:) ) ! [OUT]
613  call file_cartesc_read( restart_fid, var_name(i_tbl), 'UXY', & ! [IN]
614  urban_tbl(:,:,:) ) ! [OUT]
615  call file_cartesc_read( restart_fid, var_name(i_tgl), 'UXY', & ! [IN]
616  urban_tgl(:,:,:) ) ! [OUT]
617 
618  call file_cartesc_read( restart_fid, var_name(i_tr), 'XY', & ! [IN]
619  urban_tr(:,:) ) ! [OUT]
620  call file_cartesc_read( restart_fid, var_name(i_tb), 'XY', & ! [IN]
621  urban_tb(:,:) ) ! [OUT]
622  call file_cartesc_read( restart_fid, var_name(i_tg), 'XY', & ! [IN]
623  urban_tg(:,:) ) ! [OUT]
624  call file_cartesc_read( restart_fid, var_name(i_tc), 'XY', & ! [IN]
625  urban_tc(:,:) ) ! [OUT]
626  call file_cartesc_read( restart_fid, var_name(i_qc), 'XY', & ! [IN]
627  urban_qc(:,:) ) ! [OUT]
628  call file_cartesc_read( restart_fid, var_name(i_uc), 'XY', & ! [IN]
629  urban_uc(:,:) ) ! [OUT]
630 
631  call file_cartesc_read( restart_fid, var_name(i_rainr), 'XY', & ! [IN]
632  urban_rainr(:,:) ) ! [OUT]
633  call file_cartesc_read( restart_fid, var_name(i_rainb), 'XY', & ! [IN]
634  urban_rainb(:,:) ) ! [OUT]
635  call file_cartesc_read( restart_fid, var_name(i_raing), 'XY', & ! [IN]
636  urban_raing(:,:) ) ! [OUT]
637 
638  call file_cartesc_read( restart_fid, var_name(i_sfc_temp), 'XY', & ! [IN]
639  urban_sfc_temp(:,:) ) ! [OUT]
640  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_ir_dir), 'XY', & ! [IN]
641  urban_sfc_albedo(:,:,i_r_direct ,i_r_ir ) ) ! [OUT]
642  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_ir_dif), 'XY', & ! [IN]
643  urban_sfc_albedo(:,:,i_r_diffuse,i_r_ir ) ) ! [OUT]
644  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_nir_dir), 'XY', & ! [IN]
645  urban_sfc_albedo(:,:,i_r_direct ,i_r_nir) ) ! [OUT]
646  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_nir_dif), 'XY', & ! [IN]
647  urban_sfc_albedo(:,:,i_r_diffuse,i_r_nir) ) ! [OUT]
648  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_vis_dir), 'XY', & ! [IN]
649  urban_sfc_albedo(:,:,i_r_direct ,i_r_vis) ) ! [OUT]
650  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_vis_dif), 'XY', & ! [IN]
651  urban_sfc_albedo(:,:,i_r_diffuse,i_r_vis) ) ! [OUT]
652 
653  if( file_get_aggregate(restart_fid) ) call file_cartesc_flush( restart_fid ) ! commit all pending read requests
654 
655  call urban_vars_check( force = .true. )
656  else
657  log_error("URBAN_vars_restart_read",*) 'invalid restart file ID for urban.'
658  call prc_abort
659  endif
660 
661  return
662  end subroutine urban_vars_restart_read
663 
664  !-----------------------------------------------------------------------------
666  subroutine urban_vars_history
667  use scale_file_history, only: &
668  file_history_in
669  use scale_atmos_hydrometeor, only: &
670  i_qv
671  implicit none
672  !---------------------------------------------------------------------------
673 
674  call prof_rapstart('URB_History', 1)
675 
676  call file_history_in( urban_trl(:,:,:), var_name(i_trl), var_desc(i_trl), var_unit(i_trl), dim_type='UXY' )
677  call file_history_in( urban_tbl(:,:,:), var_name(i_tbl), var_desc(i_tbl), var_unit(i_tbl), dim_type='UXY' )
678  call file_history_in( urban_tgl(:,:,:), var_name(i_tgl), var_desc(i_tgl), var_unit(i_tgl), dim_type='UXY' )
679 
680  call file_history_in( urban_tr(:,:), var_name(i_tr), var_desc(i_tr), var_unit(i_tr) )
681  call file_history_in( urban_tb(:,:), var_name(i_tb), var_desc(i_tb), var_unit(i_tb) )
682  call file_history_in( urban_tg(:,:), var_name(i_tg), var_desc(i_tg), var_unit(i_tg) )
683  call file_history_in( urban_tc(:,:), var_name(i_tc), var_desc(i_tc), var_unit(i_tc) )
684  call file_history_in( urban_qc(:,:), var_name(i_qc), var_desc(i_qc), var_unit(i_qc) )
685  call file_history_in( urban_uc(:,:), var_name(i_uc), var_desc(i_uc), var_unit(i_uc) )
686 
687  call file_history_in( urban_rainr(:,:), var_name(i_rainr), var_desc(i_rainr), var_unit(i_rainr) )
688  call file_history_in( urban_rainb(:,:), var_name(i_rainb), var_desc(i_rainb), var_unit(i_rainb) )
689  call file_history_in( urban_raing(:,:), var_name(i_raing), var_desc(i_raing), var_unit(i_raing) )
690 
691  call file_history_in( urban_sfc_temp(:,:), var_name(i_sfc_temp), &
692  var_desc(i_sfc_temp), var_unit(i_sfc_temp), standard_name=var_stdn(i_sfc_temp) )
693 
694  call file_history_in( urban_sfc_albedo(:,:,i_r_direct ,i_r_ir ), var_name(i_sfc_alb_ir_dir), &
695  var_desc(i_sfc_alb_ir_dir), var_unit(i_sfc_alb_ir_dir), standard_name=var_stdn(i_sfc_alb_ir_dir) )
696  call file_history_in( urban_sfc_albedo(:,:,i_r_diffuse,i_r_ir ), var_name(i_sfc_alb_ir_dif), &
697  var_desc(i_sfc_alb_ir_dif), var_unit(i_sfc_alb_ir_dif), standard_name=var_stdn(i_sfc_alb_ir_dif) )
698  call file_history_in( urban_sfc_albedo(:,:,i_r_direct ,i_r_nir), var_name(i_sfc_alb_nir_dir), &
699  var_desc(i_sfc_alb_nir_dir), var_unit(i_sfc_alb_nir_dir), standard_name=var_stdn(i_sfc_alb_nir_dir) )
700  call file_history_in( urban_sfc_albedo(:,:,i_r_diffuse,i_r_nir), var_name(i_sfc_alb_nir_dif), &
701  var_desc(i_sfc_alb_nir_dif), var_unit(i_sfc_alb_nir_dif), standard_name=var_stdn(i_sfc_alb_nir_dif) )
702  call file_history_in( urban_sfc_albedo(:,:,i_r_direct ,i_r_vis), var_name(i_sfc_alb_vis_dir), &
703  var_desc(i_sfc_alb_vis_dir), var_unit(i_sfc_alb_vis_dir), standard_name=var_stdn(i_sfc_alb_vis_dir) )
704  call file_history_in( urban_sfc_albedo(:,:,i_r_diffuse,i_r_vis), var_name(i_sfc_alb_vis_dif), &
705  var_desc(i_sfc_alb_vis_dif), var_unit(i_sfc_alb_vis_dif), standard_name=var_stdn(i_sfc_alb_vis_dif) )
706 
707  call file_history_in( urban_roff(:,:), 'URBAN_RUNOFF', &
708  'urban runoff water', 'kg/m2/s' )
709 
710  call file_history_in( urban_sflx_mw(:,:), 'URBAN_SFLX_MW', &
711  'urban grid average of w-momentum flux', 'kg/m2/s' )
712  call file_history_in( urban_sflx_mu(:,:), 'URBAN_SFLX_MU', &
713  'urban grid average of u-momentum flux', 'kg/m2/s' )
714  call file_history_in( urban_sflx_mv(:,:), 'URBAN_SFLX_MV', &
715  'urban grid average of v-momentum flux', 'kg/m2/s' )
716  call file_history_in( urban_sflx_sh(:,:), 'URBAN_SFLX_SH', &
717  'urban grid average of sensible heat flux (upward)', 'W/m2' )
718  call file_history_in( urban_sflx_lh(:,:), 'URBAN_SFLX_LH', &
719  'urban grid average of latent heat flux (upward)', 'W/m2' )
720  call file_history_in( urban_sflx_gh(:,:), 'URBAN_SFLX_GH', &
721  'urban grid average of subsurface heat flux (downward)', 'W/m2' )
722  if ( i_qv > 0 ) &
723  call file_history_in( urban_sflx_qtrc(:,:,i_qv), 'URBAN_SFLX_evap', &
724  'urban grid average of water vapor flux (upward)', 'kg/m2/s' )
725 
726  call file_history_in( urban_ustar(:,:), 'URBAN_Ustar', &
727  'urban friction velocity', 'm/s' )
728  call file_history_in( urban_tstar(:,:), 'URBAN_Tstar', &
729  'urban temperature scale', 'K' )
730  call file_history_in( urban_qstar(:,:), 'URBAN_Qstar', &
731  'urban moisture scale', 'kg/kg' )
732  call file_history_in( urban_wstar(:,:), 'URBAN_Wstar', &
733  'urban convective velocity scale', 'm/s' )
734  call file_history_in( urban_rlmo(:,:), 'URBAN_RLmo', &
735  'urban inversed Obukhov length', '1/m' )
736  call file_history_in( urban_u10(:,:), 'URBAN_U10', &
737  'urban 10m x-wind', 'm/s' )
738  call file_history_in( urban_v10(:,:), 'URBAN_V10', &
739  'urban 10m y-wind', 'm/s' )
740  call file_history_in( urban_t2(:,:), 'URBAN_T2', &
741  'urban 2m temprerature', 'K' )
742  call file_history_in( urban_q2(:,:), 'URBAN_Q2', &
743  'urban 2m specific humidity', 'kg/kg' )
744  call file_history_in( urban_z0m(:,:), 'URBAN_Z0M', &
745  'urban parameter of rougness length for momentum', 'm' )
746  call file_history_in( urban_z0h(:,:), 'URBAN_Z0H', &
747  'urban parameter of rougness length for heat', 'm' )
748  call file_history_in( urban_z0e(:,:), 'URBAN_Z0E', &
749  'urban parameter of rougness length for vapor', 'm' )
750  call file_history_in( urban_zd(:,:), 'URBAN_ZD', &
751  'urban parameter of displacement height', 'm' )
752  call file_history_in( urban_ah(:,:), 'URBAN_AH', &
753  'urban parameter of anthropogenic sensible heat', 'W/m2' )
754  call file_history_in( urban_ahl(:,:), 'URBAN_AHL', &
755  'urban parameter of anthropogenic latent heat', 'W/m2' )
756 
757 
758  call prof_rapend ('URB_History', 1)
759 
760  return
761  end subroutine urban_vars_history
762 
763  !-----------------------------------------------------------------------------
765  subroutine urban_vars_monitor
766  use scale_const, only: &
767  dwatr => const_dwatr
768  use scale_atmos_hydrometeor, only: &
769  cv_water
770  use scale_monitor, only: &
771  monitor_put
772  implicit none
773 
774  real(rp) :: work3d(uka,uia,uja)
775  real(rp) :: work2d(uia,uja)
776 
777  integer :: k, i, j
778  !---------------------------------------------------------------------------
779 
780  call monitor_put( monit_id(im_trl), urban_trl(:,:,:) )
781  call monitor_put( monit_id(im_tbl), urban_tbl(:,:,:) )
782  call monitor_put( monit_id(im_tgl), urban_tgl(:,:,:) )
783 
784  call monitor_put( monit_id(im_tr), urban_tr(:,:) )
785  call monitor_put( monit_id(im_tb), urban_tb(:,:) )
786  call monitor_put( monit_id(im_tg), urban_tg(:,:) )
787  call monitor_put( monit_id(im_tc), urban_tc(:,:) )
788  call monitor_put( monit_id(im_uc), urban_uc(:,:) )
789  if ( monit_id(im_qc) > 0 ) then
790  !$omp parallel do
791  do j = ujs, uje
792  do i = uis, uie
793  work2d(i,j) = urban_qc(i,j) * atmos_dens(i,j)
794  end do
795  end do
796  call monitor_put( monit_id(im_qc), work2d(:,:) )
797  end if
798 
799  ! mass budget
800  call monitor_put( monit_id(im_rainr), urban_rainr(:,:) )
801  call monitor_put( monit_id(im_rainb), urban_rainb(:,:) )
802  call monitor_put( monit_id(im_raing), urban_raing(:,:) )
803  call monitor_put( monit_id(im_roff) , urban_roff(:,:) )
804 !!$ call MONITOR_put( MONIT_id(IM_SFCWR), URBAN_SFLX_waterR(:,:) )
805 !!$ call MONITOR_put( MONIT_id(IM_SFCWB), URBAN_SFLX_waterB(:,:) )
806 !!$ call MONITOR_put( MONIT_id(IM_SFCWG), URBAN_SFLX_waterG(:,:) )
807 !!$ call MONITOR_put( MONIT_id(IM_SFCIR), URBAN_SFLX_iceR (:,:) )
808 !!$ call MONITOR_put( MONIT_id(IM_SFCIB), URBAN_SFLX_iceB (:,:) )
809 !!$ call MONITOR_put( MONIT_id(IM_SFCIG), URBAN_SFLX_iceG (:,:) )
810 !!$ if ( MONIT_id(IM_MASFLX) > 0 ) then
811 !!$ !$omp parallel do
812 !!$ do j = UJS, UJE
813 !!$ do i = UIS, UIE
814 !!$ WORK2D(i,j) = URBAN_SFLX_waterR(i,j) + URBAN_SFLX_iceR(i,j) &
815 !!$ + URBAN_SFLX_waterB(i,j) + URBAN_SFLX_iceB(i,j) &
816 !!$ + URBAN_SFLX_waterG(i,j) + URBAN_SFLX_iceG(i,j) &
817 !!$ - URBAN_RUNOFF(i,j)
818 !!$ end do
819 !!$ end do
820 !!$ call MONITOR_put( MONIT_id(IM_MASFLX), WORK2D(:,:) )
821 !!$ end if
822 
823  ! energy budget
824 !!$ if ( MONIT_id(IM_ENGI_S) > 0 ) then
825 !!$ !$omp parallel do
826 !!$ do j = UJS, UJE
827 !!$ do i = UIS, UIE
828 !!$ do k = UKS, UKE
829 !!$ WORK3D(k,i,j) = CAPR(i,j) * URBAN_TRL(k,i,j) &
830 !!$ + CAPB(i,j) * URBAN_TRB(k,i,j) &
831 !!$ + CAPG(i,j) * URBAN_TRG(k,i,j)
832 !!$ end do
833 !!$ end do
834 !!$ end do
835 !!$ call MONITOR_put( MONIT_id(IM_ENGI_S), WORK3D(:,:,:) )
836 !!$ end if
837 !!$ if ( MONIT_id(IM_ENGI_SR) > 0 ) then
838 !!$ !$omp parallel do
839 !!$ do j = UJS, UJE
840 !!$ do i = UIS, UIE
841 !!$ do k = UKS, UKE
842 !!$ WORK3D(k,i,j) = CAPR(i,j) * URBAN_TRL(k,i,j)
843 !!$ end do
844 !!$ end do
845 !!$ end do
846 !!$ call MONITOR_put( MONIT_id(IM_ENGI_SR), WORK3D(:,:,:) )
847 !!$ end if
848 !!$ if ( MONIT_id(IM_ENGI_SB) > 0 ) then
849 !!$ !$omp parallel do
850 !!$ do j = UJS, UJE
851 !!$ do i = UIS, UIE
852 !!$ do k = UKS, UKE
853 !!$ WORK3D(k,i,j) = CAPB(i,j) * URBAN_TBL(k,i,j)
854 !!$ end do
855 !!$ end do
856 !!$ end do
857 !!$ call MONITOR_put( MONIT_id(IM_ENGI_SB), WORK3D(:,:,:) )
858 !!$ end if
859 !!$ if ( MONIT_id(IM_ENGI_SG) > 0 ) then
860 !!$ !$omp parallel do
861 !!$ do j = UJS, UJE
862 !!$ do i = UIS, UIE
863 !!$ do k = UKS, UKE
864 !!$ WORK3D(k,i,j) = CAPG(i,j) * URBAN_TGL(k,i,j)
865 !!$ end do
866 !!$ end do
867 !!$ end do
868 !!$ call MONITOR_put( MONIT_id(IM_ENGI_SG), WORK3D(:,:,:) )
869 !!$ end if
870 !!$ if ( MONIT_id(IM_ENGI_W) > 0 ) then
871 !!$ !$omp parallel do
872 !!$ do j = UJS, UJE
873 !!$ do i = UIS, UIE
874 !!$ WORK2D(i,j) = CV_WATER * ( URBAN_RAINR(k,i,j) * URBAN_TRL(UKS,i,j) &
875 !!$ + URBAN_RAINB(k,i,j) * URBAN_TBL(UKS,i,j) &
876 !!$ + URBAN_RAING(k,i,j) * URBAN_TGL(UKS,i,j) )
877 !!$ end do
878 !!$ end do
879 !!$ call MONITOR_put( MONIT_id(IM_ENGI_W), WORK2D(:,:) )
880 !!$ end if
881 !!$ if ( MONIT_id(IM_ENGI_WR) > 0 ) then
882 !!$ !$omp parallel do
883 !!$ do j = UJS, UJE
884 !!$ do i = UIS, UIE
885 !!$ WORK2D(i,j) = CV_WATER * URBAN_RAINR(k,i,j) * URBAN_TRL(UKS,i,j)
886 !!$ end do
887 !!$ end do
888 !!$ call MONITOR_put( MONIT_id(IM_ENGI_WR), WORK2D(:,:) )
889 !!$ end if
890 !!$ if ( MONIT_id(IM_ENGI_WB) > 0 ) then
891 !!$ !$omp parallel do
892 !!$ do j = UJS, UJE
893 !!$ do i = UIS, UIE
894 !!$ WORK2D(i,j) = CV_WATER * URBAN_RAINB(k,i,j) * URBAN_TBL(UKS,i,j)
895 !!$ end do
896 !!$ end do
897 !!$ call MONITOR_put( MONIT_id(IM_ENGI_WB), WORK2D(:,:) )
898 !!$ end if
899 !!$ if ( MONIT_id(IM_ENGI_WG) > 0 ) then
900 !!$ !$omp parallel do
901 !!$ do j = UJS, UJE
902 !!$ do i = UIS, UIE
903 !!$ WORK2D(i,j) = CV_WATER * URBAN_RAING(k,i,j) * URBAN_TGL(UKS,i,j)
904 !!$ end do
905 !!$ end do
906 !!$ call MONITOR_put( MONIT_id(IM_ENGI_WG), WORK2D(:,:) )
907 !!$ end if
908 
909 !!$ call MONITOR_put( MONIT_id(IM_ENGSFC_GHR), URBAN_SFLX_GHR (:,:) )
910 !!$ call MONITOR_put( MONIT_id(IM_ENGSFC_GHB), URBAN_SFLX_GHB (:,:) )
911 !!$ call MONITOR_put( MONIT_id(IM_ENGSFC_GHG), URBAN_SFLX_GHG (:,:) )
912 !!$ call MONITOR_put( MONIT_id(IM_ENGSFC_EIR), URBAN_SFLX_ENGIR (:,:) )
913 !!$ call MONITOR_put( MONIT_id(IM_ENGSFC_EIB), URBAN_SFLX_ENGIB (:,:) )
914 !!$ call MONITOR_put( MONIT_id(IM_ENGSFC_EIG), URBAN_SFLX_ENGIG (:,:) )
915 !!$ call MONITOR_put( MONIT_id(IM_ROFF_EIR), URBAN_RUNOFF_ENGIR(:,:) )
916 !!$ call MONITOR_put( MONIT_id(IM_ROFF_EIB), URBAN_RUNOFF_ENGIB(:,:) )
917 !!$ call MONITOR_put( MONIT_id(IM_ROFF_EIG), URBAN_RUNOFF_ENGIG(:,:) )
918 !!$ if ( MONIT_id(IM_ENGFLX) > 0 ) then
919 !!$ !$omp parallel do
920 !!$ do j = UJS, UJE
921 !!$ do i = UIS, UIE
922 !!$ WORK2D(i,j) = URBAN_SFLX_GHR(i,j) + URBAN_SFLX_ENGIR(i,j) &
923 !!$ + URBAN_SFLX_GHB(i,j) + URBAN_SFLX_ENGIB(i,j) &
924 !!$ + URBAN_SFLX_GHG(i,j) + URBAN_SFLX_ENGIG(i,j) &
925 !!$ - URBAN_RUNOFF_ENGIR(i,j) &
926 !!$ - URBAN_RUNOFF_ENGIB(i,j) &
927 !!$ - URBAN_RUNOFF_ENGIG(i,j)
928 !!$ end do
929 !!$ end do
930 !!$ call MONITOR_put( MONIT_id(IM_ENGFLX), WORK2D(:,:) )
931 !!$ end if
932 
933 
934  return
935  end subroutine urban_vars_monitor
936 
937  !-----------------------------------------------------------------------------
939  subroutine urban_vars_check( force )
940  use scale_statistics, only: &
942  statistics_total
943  use scale_atmos_hydrometeor, only: &
944  i_qv
945  use scale_urban_grid_cartesc_real, only: &
950  use scale_landuse, only: &
952  implicit none
953  logical, intent(in), optional :: force
954  logical :: check
955  !---------------------------------------------------------------------------
956 
957  if ( present(force) ) then
958  check = force
959  else
960  check = urban_vars_checkrange
961  end if
962 
963  if ( check ) then
964  call valcheck( uka, uks, uke, uia, uis, uie, uja, ujs, uje, &
965  urban_trl(:,:,:), 0.0_rp, 1000.0_rp, var_name(i_trl), &
966  __file__, __line__, mask = landuse_exists_urban(:,:) )
967  call valcheck( uka, uks, uke, uia, uis, uie, uja, ujs, uje, &
968  urban_tbl(:,:,:), 0.0_rp, 1000.0_rp, var_name(i_tbl), &
969  __file__, __line__, mask = landuse_exists_urban(:,:) )
970  call valcheck( uka, uks, uke, uia, uis, uie, uja, ujs, uje, &
971  urban_tgl(:,:,:), 0.0_rp, 1000.0_rp, var_name(i_tgl), &
972  __file__, __line__, mask = landuse_exists_urban(:,:) )
973  call valcheck( uia, uis, uie, uja, ujs, uje, &
974  urban_tr(:,:), 0.0_rp, 1000.0_rp, var_name(i_tr), &
975  __file__, __line__, mask = landuse_exists_urban(:,:) )
976  call valcheck( uia, uis, uie, uja, ujs, uje, &
977  urban_tb(:,:), 0.0_rp, 1000.0_rp, var_name(i_tb), &
978  __file__, __line__, mask = landuse_exists_urban(:,:) )
979  call valcheck( uia, uis, uie, uja, ujs, uje, &
980  urban_tg(:,:), 0.0_rp, 1000.0_rp, var_name(i_tg), &
981  __file__, __line__, mask = landuse_exists_urban(:,:) )
982  call valcheck( uia, uis, uie, uja, ujs, uje, &
983  urban_tc(:,:), 0.0_rp, 1000.0_rp, var_name(i_tc), &
984  __file__, __line__, mask = landuse_exists_urban(:,:) )
985  call valcheck( uia, uis, uie, uja, ujs, uje, &
986  urban_qc(:,:), 0.0_rp, 1.0_rp, var_name(i_qc), &
987  __file__, __line__, mask = landuse_exists_urban(:,:) )
988  call valcheck( uia, uis, uie, uja, ujs, uje, &
989  urban_uc(:,:), 0.0_rp, 100.0_rp, var_name(i_uc), &
990  __file__, __line__, mask = landuse_exists_urban(:,:) )
991  call valcheck( uia, uis, uie, uja, ujs, uje, &
992  urban_rainr(:,:), 0.0_rp, 1000.0_rp, var_name(i_rainr), &
993  __file__, __line__, mask = landuse_exists_urban(:,:) )
994  call valcheck( uia, uis, uie, uja, ujs, uje, &
995  urban_rainb(:,:), 0.0_rp, 1000.0_rp, var_name(i_rainb), &
996  __file__, __line__, mask = landuse_exists_urban(:,:) )
997  call valcheck( uia, uis, uie, uja, ujs, uje, &
998  urban_raing(:,:), 0.0_rp, 1000.0_rp, var_name(i_raing), &
999  __file__, __line__, mask = landuse_exists_urban(:,:) )
1000 
1001  call valcheck( uia, uis, uie, uja, ujs, uje, &
1002  urban_sfc_temp(:,:), 0.0_rp, 1000.0_rp, &
1003  var_name(i_sfc_temp), __file__, __line__, &
1004  mask = landuse_exists_urban(:,:) )
1005 
1006  call valcheck( uia, uis, uie, uja, ujs, uje, &
1007  urban_sfc_albedo(:,:,i_r_direct ,i_r_ir ), 0.0_rp, 2.0_rp, &
1008  var_name(i_sfc_alb_ir_dir ), __file__, __line__, &
1009  mask = landuse_exists_urban(:,:) )
1010  call valcheck( uia, uis, uie, uja, ujs, uje, &
1011  urban_sfc_albedo(:,:,i_r_diffuse,i_r_ir ), 0.0_rp, 2.0_rp, &
1012  var_name(i_sfc_alb_ir_dif ), __file__, __line__, &
1013  mask = landuse_exists_urban(:,:) )
1014  call valcheck( uia, uis, uie, uja, ujs, uje, &
1015  urban_sfc_albedo(:,:,i_r_direct ,i_r_nir), 0.0_rp, 2.0_rp, &
1016  var_name(i_sfc_alb_nir_dir), __file__, __line__, &
1017  mask = landuse_exists_urban(:,:) )
1018  call valcheck( uia, uis, uie, uja, ujs, uje, &
1019  urban_sfc_albedo(:,:,i_r_diffuse,i_r_nir), 0.0_rp, 2.0_rp, &
1020  var_name(i_sfc_alb_nir_dif), __file__, __line__, &
1021  mask = landuse_exists_urban(:,:) )
1022  call valcheck( uia, uis, uie, uja, ujs, uje, &
1023  urban_sfc_albedo(:,:,i_r_direct ,i_r_vis), 0.0_rp, 2.0_rp, &
1024  var_name(i_sfc_alb_vis_dir), __file__, __line__, &
1025  mask = landuse_exists_urban(:,:) )
1026  call valcheck( uia, uis, uie, uja, ujs, uje, &
1027  urban_sfc_albedo(:,:,i_r_diffuse,i_r_vis), 0.0_rp, 2.0_rp, &
1028  var_name(i_sfc_alb_vis_dif), __file__, __line__, &
1029  mask = landuse_exists_urban(:,:) )
1030  endif
1031 
1032  if ( present(force) ) then
1033  check = force
1034  else
1036  end if
1037 
1038  if ( check ) then
1039 
1040  ! 3D
1041  call statistics_total( uka, uks, uke, uia, uis, uie, uja, ujs, uje, &
1042  urban_trl(:,:,:), var_name(i_trl), & ! (in)
1043  urban_grid_cartesc_real_vol(:,:,:), & ! (in)
1045  call statistics_total( uka, uks, uke, uia, uis, uie, uja, ujs, uje, &
1046  urban_tbl(:,:,:), var_name(i_tbl), & ! (in)
1047  urban_grid_cartesc_real_vol(:,:,:), & ! (in)
1049  call statistics_total( uka, uks, uke, uia, uis, uie, uja, ujs, uje, &
1050  urban_tgl(:,:,:), var_name(i_tgl), & ! (in)
1051  urban_grid_cartesc_real_vol(:,:,:), & ! (in)
1053 
1054  ! 2D
1055  call statistics_total( uia, uis, uie, uja, ujs, uje, &
1056  urban_tr(:,:), var_name(i_tr), & ! (in)
1057  urban_grid_cartesc_real_area(:,:), & ! (in)
1059  call statistics_total( uia, uis, uie, uja, ujs, uje, &
1060  urban_tb(:,:), var_name(i_tb), & ! (in)
1061  urban_grid_cartesc_real_area(:,:), & ! (in)
1063  call statistics_total( uia, uis, uie, uja, ujs, uje, &
1064  urban_tg(:,:), var_name(i_tg), & ! (in)
1065  urban_grid_cartesc_real_area(:,:), & ! (in)
1067  call statistics_total( uia, uis, uie, uja, ujs, uje, &
1068  urban_tc(:,:), var_name(i_tc), & ! (in)
1069  urban_grid_cartesc_real_area(:,:), & ! (in)
1071  call statistics_total( uia, uis, uie, uja, ujs, uje, &
1072  urban_qc(:,:), var_name(i_qc), & ! (in)
1073  urban_grid_cartesc_real_area(:,:), & ! (in)
1075  call statistics_total( uia, uis, uie, uja, ujs, uje, &
1076  urban_uc(:,:), var_name(i_uc), & ! (in)
1077  urban_grid_cartesc_real_area(:,:), & ! (in)
1079 
1080  call statistics_total( uia, uis, uie, uja, ujs, uje, &
1081  urban_rainr(:,:), var_name(i_rainr), & ! (in)
1082  urban_grid_cartesc_real_area(:,:), & ! (in)
1084  call statistics_total( uia, uis, uie, uja, ujs, uje, &
1085  urban_rainb(:,:), var_name(i_rainb), & ! (in)
1086  urban_grid_cartesc_real_area(:,:), & ! (in)
1088  call statistics_total( uia, uis, uie, uja, ujs, uje, &
1089  urban_raing(:,:), var_name(i_raing), & ! (in)
1090  urban_grid_cartesc_real_area(:,:), & ! (in)
1092 
1093  call statistics_total( uia, uis, uie, uja, ujs, uje, & ! [IN]
1094  urban_sfc_temp(:,:), var_name(i_sfc_temp), & ! [IN]
1095  urban_grid_cartesc_real_area(:,:), & ! [IN]
1097  call statistics_total( uia, uis, uie, uja, ujs, uje, & ! [IN]
1098  urban_sfc_albedo(:,:,i_r_direct ,i_r_ir ), var_name(i_sfc_alb_ir_dir), & ! [IN]
1099  urban_grid_cartesc_real_area(:,:), & ! [IN]
1101  call statistics_total( uia, uis, uie, uja, ujs, uje, & ! [IN]
1102  urban_sfc_albedo(:,:,i_r_diffuse,i_r_ir ), var_name(i_sfc_alb_ir_dif), & ! [IN]
1103  urban_grid_cartesc_real_area(:,:), & ! [IN]
1105  call statistics_total( uia, uis, uie, uja, ujs, uje, & ! [IN]
1106  urban_sfc_albedo(:,:,i_r_direct ,i_r_nir), var_name(i_sfc_alb_nir_dir), & ! [IN]
1107  urban_grid_cartesc_real_area(:,:), & ! [IN]
1109  call statistics_total( uia, uis, uie, uja, ujs, uje, & ! [IN]
1110  urban_sfc_albedo(:,:,i_r_diffuse,i_r_nir), var_name(i_sfc_alb_nir_dif), & ! [IN]
1111  urban_grid_cartesc_real_area(:,:), & ! [IN]
1113  call statistics_total( uia, uis, uie, uja, ujs, uje, & ! [IN]
1114  urban_sfc_albedo(:,:,i_r_direct ,i_r_vis), var_name(i_sfc_alb_vis_dir), & ! [IN]
1115  urban_grid_cartesc_real_area(:,:), & ! [IN]
1117  call statistics_total( uia, uis, uie, uja, ujs, uje, & ! [IN]
1118  urban_sfc_albedo(:,:,i_r_diffuse,i_r_vis), var_name(i_sfc_alb_vis_dif), & ! [IN]
1119  urban_grid_cartesc_real_area(:,:), & ! [IN]
1121  endif
1122 
1123  return
1124  end subroutine urban_vars_check
1125 
1126  !-----------------------------------------------------------------------------
1128  subroutine urban_vars_restart_create
1129  use scale_time, only: &
1131  use scale_file_cartesc, only: &
1133  use mod_urban_admin, only: &
1134  urban_do
1135  implicit none
1136 
1137  character(len=19) :: timelabel
1138  character(len=H_LONG) :: basename
1139  !---------------------------------------------------------------------------
1140 
1141  if ( urban_do .and. urban_restart_out_basename /= '' ) then
1142 
1143  log_newline
1144  log_info("URBAN_vars_restart_create",*) 'Create restart file (URBAN) '
1145 
1147  call time_gettimelabel( timelabel )
1148  basename = trim(urban_restart_out_basename)//'_'//trim(timelabel)
1149  else
1150  basename = trim(urban_restart_out_basename)
1151  endif
1152 
1153  log_info("URBAN_vars_restart_create",*) 'basename: ', trim(basename)
1154 
1155  call file_cartesc_create( &
1157  restart_fid, & ! [OUT]
1158  aggregate=urban_restart_out_aggregate ) ! [IN]
1159 
1160  endif
1161 
1162  return
1163  end subroutine urban_vars_restart_create
1164 
1165  !-----------------------------------------------------------------------------
1167  subroutine urban_vars_restart_enddef
1168  use scale_file_cartesc, only: &
1170  implicit none
1171 
1172  if ( restart_fid /= -1 ) then
1173  call file_cartesc_enddef( restart_fid ) ! [IN]
1174  endif
1175 
1176  return
1177  end subroutine urban_vars_restart_enddef
1178 
1179  !-----------------------------------------------------------------------------
1181  subroutine urban_vars_restart_close
1182  use scale_file_cartesc, only: &
1184  implicit none
1185  !---------------------------------------------------------------------------
1186 
1187  if ( restart_fid /= -1 ) then
1188  log_newline
1189  log_info("URBAN_vars_restart_close",*) 'Close restart file (URBAN) '
1190 
1191  call file_cartesc_close( restart_fid ) ! [IN]
1192 
1193  restart_fid = -1
1194  endif
1195 
1196  return
1197  end subroutine urban_vars_restart_close
1198 
1199  !-----------------------------------------------------------------------------
1201  subroutine urban_vars_restart_def_var
1202  use scale_file_cartesc, only: &
1204  implicit none
1205 
1206  integer :: i
1207  !---------------------------------------------------------------------------
1208 
1209  if ( restart_fid /= -1 ) then
1210 
1211  do i = i_trl, i_tgl
1212  call file_cartesc_def_var( restart_fid, & ! [IN]
1213  var_name(i), var_desc(i), var_unit(i), & ! [IN]
1214  'UXY', urban_restart_out_dtype, & ! [IN]
1215  var_id(i) ) ! [OUT]
1216  end do
1217  do i = i_tr, i_sfc_alb_vis_dif
1218  call file_cartesc_def_var( restart_fid, & ! [IN]
1219  var_name(i), var_desc(i), var_unit(i), & ! [IN]
1220  'XY', urban_restart_out_dtype, & ! [IN]
1221  var_id(i) ) ! [OUT]
1222  end do
1223 
1224  endif
1225 
1226  return
1227  end subroutine urban_vars_restart_def_var
1228 
1229  !-----------------------------------------------------------------------------
1231  subroutine urban_vars_restart_write
1232  use scale_file_cartesc, only: &
1233  file_cartesc_write_var
1234  implicit none
1235  !---------------------------------------------------------------------------
1236 
1237  if ( restart_fid /= -1 ) then
1238 
1239  call urban_vars_check( force = .true. )
1240 
1241  call file_cartesc_write_var( restart_fid, var_id(i_trl), urban_trl(:,:,:), & ! [IN]
1242  var_name(i_trl), 'UXY', fill_halo=.true. ) ! [IN]
1243  call file_cartesc_write_var( restart_fid, var_id(i_tbl), urban_tbl(:,:,:), & ! [IN]
1244  var_name(i_tbl), 'UXY', fill_halo=.true. ) ! [IN]
1245  call file_cartesc_write_var( restart_fid, var_id(i_tgl), urban_tgl(:,:,:), & ! [IN]
1246  var_name(i_tgl), 'UXY', fill_halo=.true. ) ! [IN]
1247 
1248  call file_cartesc_write_var( restart_fid, var_id(i_tr), urban_tr(:,:), & ! [IN]
1249  var_name(i_tr), 'XY', fill_halo=.true. ) ! [IN]
1250  call file_cartesc_write_var( restart_fid, var_id(i_tb), urban_tb(:,:), & ! [IN]
1251  var_name(i_tb), 'XY', fill_halo=.true. ) ! [IN]
1252  call file_cartesc_write_var( restart_fid, var_id(i_tg), urban_tg(:,:), & ! [IN]
1253  var_name(i_tg), 'XY', fill_halo=.true. ) ! [IN]
1254  call file_cartesc_write_var( restart_fid, var_id(i_tc), urban_tc(:,:), & ! [IN]
1255  var_name(i_tc), 'XY', fill_halo=.true. ) ! [IN]
1256  call file_cartesc_write_var( restart_fid, var_id(i_qc), urban_qc(:,:), & ! [IN]
1257  var_name(i_qc), 'XY', fill_halo=.true. ) ! [IN]
1258  call file_cartesc_write_var( restart_fid, var_id(i_uc), urban_uc(:,:), & ! [IN]
1259  var_name(i_uc), 'XY', fill_halo=.true. ) ! [IN]
1260 
1261 
1262  call file_cartesc_write_var( restart_fid, var_id(i_rainr), urban_rainr(:,:), & ! [IN]
1263  var_name(i_rainr), 'XY', fill_halo=.true. ) ! [IN]
1264  call file_cartesc_write_var( restart_fid, var_id(i_rainb), urban_rainb(:,:), & ! [IN]
1265  var_name(i_rainb), 'XY', fill_halo=.true. ) ! [IN]
1266  call file_cartesc_write_var( restart_fid, var_id(i_raing), urban_raing(:,:), & ! [IN]
1267  var_name(i_raing), 'XY', fill_halo=.true. ) ! [IN]
1268 
1269  call file_cartesc_write_var( restart_fid, var_id(i_sfc_temp), & ! [IN]
1270  urban_sfc_temp(:,:), & ! [IN]
1271  var_name(i_sfc_temp), 'XY', fill_halo=.true. ) ! [IN]
1272 
1273  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_ir_dir), & ! [IN]
1274  urban_sfc_albedo(:,:,i_r_direct ,i_r_ir ), & ! [IN]
1275  var_name(i_sfc_alb_ir_dir), 'XY', fill_halo=.true. ) ! [IN]
1276  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_ir_dif), & ! [IN]
1277  urban_sfc_albedo(:,:,i_r_diffuse,i_r_ir ), & ! [IN]
1278  var_name(i_sfc_alb_ir_dif), 'XY', fill_halo=.true. ) ! [IN]
1279  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_nir_dir), & ! [IN]
1280  urban_sfc_albedo(:,:,i_r_direct ,i_r_nir), & ! [IN]
1281  var_name(i_sfc_alb_nir_dir), 'XY', fill_halo=.true. ) ! [IN]
1282  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_nir_dif), & ! [IN]
1283  urban_sfc_albedo(:,:,i_r_diffuse,i_r_nir), & ! [IN]
1284  var_name(i_sfc_alb_nir_dif), 'XY', fill_halo=.true. ) ! [IN]
1285  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_vis_dir), & ! [IN]
1286  urban_sfc_albedo(:,:,i_r_direct ,i_r_vis), & ! [IN]
1287  var_name(i_sfc_alb_vis_dir), 'XY', fill_halo=.true. ) ! [IN]
1288  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_vis_dif), & ! [IN]
1289  urban_sfc_albedo(:,:,i_r_diffuse,i_r_vis), & ! [IN]
1290  var_name(i_sfc_alb_vis_dif), 'XY', fill_halo=.true. ) ! [IN]
1291 
1292  endif
1293 
1294  return
1295  end subroutine urban_vars_restart_write
1296 
1297 end module mod_urban_vars
mod_urban_vars::urban_q2
real(rp), dimension(:,:), allocatable, public urban_q2
Definition: mod_urban_vars.F90:120
mod_urban_vars::urban_trl_t
real(rp), dimension(:,:,:), allocatable, public urban_trl_t
Definition: mod_urban_vars.F90:78
mod_urban_vars::atmos_sflx_sw
real(rp), dimension(:,:,:), allocatable, public atmos_sflx_sw
Definition: mod_urban_vars.F90:134
scale_cpl_sfc_index::n_rad_dir
integer, parameter, public n_rad_dir
Definition: scale_cpl_sfc_index.F90:36
scale_statistics
module Statistics
Definition: scale_statistics.F90:11
mod_urban_vars::urban_z0m
real(rp), dimension(:,:), allocatable, public urban_z0m
Definition: mod_urban_vars.F90:104
mod_urban_vars::atmos_u
real(rp), dimension(:,:), allocatable, public atmos_u
Definition: mod_urban_vars.F90:126
scale_urban_grid_cartesc_index::uja
integer, public uja
Definition: scale_urban_grid_cartesC_index.F90:44
mod_urban_admin::urban_do
logical, public urban_do
Definition: mod_urban_admin.F90:32
mod_urban_vars::urban_tb_t
real(rp), dimension(:,:), allocatable, public urban_tb_t
Definition: mod_urban_vars.F90:85
mod_urban_vars::urban_sfc_temp
real(rp), dimension(:,:), allocatable, public urban_sfc_temp
Definition: mod_urban_vars.F90:74
scale_urban_grid_cartesc_real::urban_grid_cartesc_real_vol
real(rp), dimension(:,:,:), allocatable, public urban_grid_cartesc_real_vol
volume of grid cell
Definition: scale_urban_grid_cartesC_real.F90:38
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_cpl_sfc_index::i_r_direct
integer, parameter, public i_r_direct
Definition: scale_cpl_sfc_index.F90:37
scale_urban_grid_cartesc_real::urban_grid_cartesc_real_totvol
real(rp), public urban_grid_cartesc_real_totvol
total volume
Definition: scale_urban_grid_cartesC_real.F90:39
scale_tracer::qa
integer, public qa
Definition: scale_tracer.F90:34
mod_urban_vars::urban_tb
real(rp), dimension(:,:), allocatable, public urban_tb
Definition: mod_urban_vars.F90:64
scale_urban_grid_cartesc_index::uia
integer, public uia
Definition: scale_urban_grid_cartesC_index.F90:40
scale_file_cartesc::file_cartesc_enddef
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
Definition: scale_file_cartesC.F90:943
scale_file_cartesc::file_cartesc_def_var
subroutine, public file_cartesc_def_var(fid, varname, desc, unit, dim_type, datatype, vid, standard_name, timeintv, nsteps, cell_measures)
Define a variable to file.
Definition: scale_file_cartesC.F90:3307
mod_urban_vars::urban_raing_t
real(rp), dimension(:,:), allocatable, public urban_raing_t
Definition: mod_urban_vars.F90:89
scale_cpl_sfc_index::i_r_diffuse
integer, parameter, public i_r_diffuse
Definition: scale_cpl_sfc_index.F90:38
mod_urban_vars::urban_restart_in_postfix_timelabel
logical, public urban_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
Definition: mod_urban_vars.F90:52
scale_precision
module PRECISION
Definition: scale_precision.F90:14
mod_urban_vars::urban_restart_output
logical, public urban_restart_output
Output restart file?
Definition: mod_urban_vars.F90:48
mod_urban_vars::urban_sfc_albedo
real(rp), dimension(:,:,:,:), allocatable, public urban_sfc_albedo
Definition: mod_urban_vars.F90:75
mod_urban_vars::atmos_sflx_engi
real(rp), dimension(:,:), allocatable, public atmos_sflx_engi
Definition: mod_urban_vars.F90:137
scale_cpl_sfc_index::i_r_ir
integer, parameter, public i_r_ir
Definition: scale_cpl_sfc_index.F90:29
scale_prof::prof_rapstart
subroutine, public prof_rapstart(rapname_base, level, disable_barrier)
Start raptime.
Definition: scale_prof.F90:159
mod_urban_vars::urban_trl
real(rp), dimension(:,:,:), allocatable, public urban_trl
Definition: mod_urban_vars.F90:60
scale_atmos_hydrometeor
module atmosphere / hydrometeor
Definition: scale_atmos_hydrometeor.F90:12
mod_urban_vars::urban_sflx_shex
real(rp), dimension(:,:), allocatable, public urban_sflx_shex
Definition: mod_urban_vars.F90:98
mod_urban_vars::urban_sflx_mu
real(rp), dimension(:,:), allocatable, public urban_sflx_mu
Definition: mod_urban_vars.F90:94
mod_urban_vars::urban_vars_monitor
subroutine, public urban_vars_monitor
monitor output
Definition: mod_urban_vars.F90:766
mod_urban_vars::urban_raing
real(rp), dimension(:,:), allocatable, public urban_raing
Definition: mod_urban_vars.F90:71
mod_urban_vars::urban_z0h
real(rp), dimension(:,:), allocatable, public urban_z0h
Definition: mod_urban_vars.F90:105
mod_urban_vars::urban_qc
real(rp), dimension(:,:), allocatable, public urban_qc
Definition: mod_urban_vars.F90:67
scale_urban_grid_cartesc_index
module urban / grid / icosahedralA / index
Definition: scale_urban_grid_cartesC_index.F90:11
mod_urban_vars::atmos_pbl
real(rp), dimension(:,:), allocatable, public atmos_pbl
Definition: mod_urban_vars.F90:130
mod_urban_vars::urban_tbl_t
real(rp), dimension(:,:,:), allocatable, public urban_tbl_t
Definition: mod_urban_vars.F90:79
mod_urban_vars::urban_tgl_t
real(rp), dimension(:,:,:), allocatable, public urban_tgl_t
Definition: mod_urban_vars.F90:80
mod_urban_vars::atmos_w
real(rp), dimension(:,:), allocatable, public atmos_w
Definition: mod_urban_vars.F90:125
scale_file_history
module file_history
Definition: scale_file_history.F90:15
scale_file
module file
Definition: scale_file.F90:15
mod_urban_vars::atmos_v
real(rp), dimension(:,:), allocatable, public atmos_v
Definition: mod_urban_vars.F90:127
mod_urban_vars::atmos_sflx_water
real(rp), dimension(:,:), allocatable, public atmos_sflx_water
Definition: mod_urban_vars.F90:136
mod_urban_vars::atmos_dens
real(rp), dimension(:,:), allocatable, public atmos_dens
Definition: mod_urban_vars.F90:128
mod_urban_vars::urban_qstar
real(rp), dimension(:,:), allocatable, public urban_qstar
Definition: mod_urban_vars.F90:114
scale_prc
module PROCESS
Definition: scale_prc.F90:11
mod_urban_vars::urban_vars_restart_def_var
subroutine, public urban_vars_restart_def_var
Define urban variables in restart file.
Definition: mod_urban_vars.F90:1202
mod_urban_vars::urban_vars_restart_open
subroutine, public urban_vars_restart_open
Open urban restart file for read.
Definition: mod_urban_vars.F90:554
mod_urban_vars::urban_sflx_qtrc
real(rp), dimension(:,:,:), allocatable, public urban_sflx_qtrc
Definition: mod_urban_vars.F90:100
scale_precision::rp
integer, parameter, public rp
Definition: scale_precision.F90:41
scale_io
module STDIO
Definition: scale_io.F90:10
mod_urban_vars::urban_wstar
real(rp), dimension(:,:), allocatable, public urban_wstar
Definition: mod_urban_vars.F90:115
mod_urban_vars::urban_t2
real(rp), dimension(:,:), allocatable, public urban_t2
Definition: mod_urban_vars.F90:119
mod_urban_vars::urban_vars_restart_enddef
subroutine, public urban_vars_restart_enddef
Exit netCDF define mode.
Definition: mod_urban_vars.F90:1168
scale_cpl_sfc_index::i_r_nir
integer, parameter, public i_r_nir
Definition: scale_cpl_sfc_index.F90:30
mod_urban_vars::urban_vars_restart_write
subroutine, public urban_vars_restart_write
Write urban restart.
Definition: mod_urban_vars.F90:1232
scale_tracer::k
real(rp), public k
Definition: scale_tracer.F90:44
scale_const
module CONSTANT
Definition: scale_const.F90:11
mod_urban_vars::urban_vars_setup
subroutine, public urban_vars_setup
Setup.
Definition: mod_urban_vars.F90:304
mod_urban_vars::urban_vars_history
subroutine, public urban_vars_history
History output set for urban variables.
Definition: mod_urban_vars.F90:667
scale_debug::check
subroutine, public check(current_line, v)
Undefined value checker.
Definition: scale_debug.F90:56
mod_urban_vars::urban_sflx_mv
real(rp), dimension(:,:), allocatable, public urban_sflx_mv
Definition: mod_urban_vars.F90:95
mod_urban_vars::urban_tgl
real(rp), dimension(:,:,:), allocatable, public urban_tgl
Definition: mod_urban_vars.F90:62
mod_urban_vars::urban_vars_restart_create
subroutine, public urban_vars_restart_create
Create urban restart file.
Definition: mod_urban_vars.F90:1129
mod_urban_vars::urban_v10
real(rp), dimension(:,:), allocatable, public urban_v10
Definition: mod_urban_vars.F90:118
mod_urban_vars::atmos_qv
real(rp), dimension(:,:), allocatable, public atmos_qv
Definition: mod_urban_vars.F90:129
mod_urban_vars::urban_restart_out_basename
character(len=h_long), public urban_restart_out_basename
Basename of the output file.
Definition: mod_urban_vars.F90:53
mod_urban_vars::atmos_sfc_pres
real(rp), dimension(:,:), allocatable, public atmos_sfc_pres
Definition: mod_urban_vars.F90:132
mod_urban_vars::atmos_sflx_lw
real(rp), dimension(:,:,:), allocatable, public atmos_sflx_lw
Definition: mod_urban_vars.F90:133
mod_urban_vars::urban_z0e
real(rp), dimension(:,:), allocatable, public urban_z0e
Definition: mod_urban_vars.F90:106
scale_file_cartesc::file_cartesc_close
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
Definition: scale_file_cartesC.F90:1023
mod_urban_vars::urban_u10
real(rp), dimension(:,:), allocatable, public urban_u10
Definition: mod_urban_vars.F90:117
mod_urban_vars::urban_vars_restart_read
subroutine, public urban_vars_restart_read
Read urban restart.
Definition: mod_urban_vars.F90:597
mod_urban_vars::atmos_cossza
real(rp), dimension(:,:), allocatable, public atmos_cossza
Definition: mod_urban_vars.F90:135
scale_prof
module profiler
Definition: scale_prof.F90:11
scale_monitor::monitor_reg
subroutine, public monitor_reg(name, desc, unit, itemid, ndims, dim_type, is_tendency)
Search existing item, or matching check between requested and registered item.
Definition: scale_monitor.F90:241
scale_time
module TIME
Definition: scale_time.F90:11
mod_urban_vars::urban_vars_check
subroutine, public urban_vars_check(force)
Budget monitor for urban.
Definition: mod_urban_vars.F90:940
mod_urban_vars::atmos_pres
real(rp), dimension(:,:), allocatable, public atmos_pres
Definition: mod_urban_vars.F90:124
mod_urban_vars::urban_tstar
real(rp), dimension(:,:), allocatable, public urban_tstar
Definition: mod_urban_vars.F90:113
scale_tracer
module TRACER
Definition: scale_tracer.F90:12
mod_urban_vars::urban_restart_out_aggregate
logical, public urban_restart_out_aggregate
Switch to use aggregate file.
Definition: mod_urban_vars.F90:54
mod_urban_vars::urban_tc
real(rp), dimension(:,:), allocatable, public urban_tc
Definition: mod_urban_vars.F90:66
mod_urban_vars::urban_tg
real(rp), dimension(:,:), allocatable, public urban_tg
Definition: mod_urban_vars.F90:65
scale_atmos_hydrometeor::i_qv
integer, public i_qv
Definition: scale_atmos_hydrometeor.F90:77
scale_urban_grid_cartesc_index::uks
integer, public uks
Definition: scale_urban_grid_cartesC_index.F90:37
mod_urban_vars::urban_tg_t
real(rp), dimension(:,:), allocatable, public urban_tg_t
Definition: mod_urban_vars.F90:86
mod_urban_vars::urban_uc
real(rp), dimension(:,:), allocatable, public urban_uc
Definition: mod_urban_vars.F90:68
scale_const::const_dwatr
real(rp), parameter, public const_dwatr
density of water [kg/m3]
Definition: scale_const.F90:82
mod_urban_vars::urban_tr_t
real(rp), dimension(:,:), allocatable, public urban_tr_t
Definition: mod_urban_vars.F90:84
scale_debug
module DEBUG
Definition: scale_debug.F90:11
mod_urban_vars::urban_restart_out_dtype
character(len=h_short), public urban_restart_out_dtype
REAL4 or REAL8.
Definition: mod_urban_vars.F90:57
scale_file_cartesc::file_cartesc_create
subroutine, public file_cartesc_create(basename, title, datatype, fid, date, subsec, haszcoord, append, aggregate, single)
Create/open a netCDF file.
Definition: scale_file_cartesC.F90:780
scale_file_cartesc::file_cartesc_open
subroutine, public file_cartesc_open(basename, fid, aggregate)
open a netCDF file for read
Definition: scale_file_cartesC.F90:746
scale_statistics::statistics_checktotal
logical, public statistics_checktotal
calc&report variable totals to logfile?
Definition: scale_statistics.F90:64
mod_urban_vars::urban_sflx_lh
real(rp), dimension(:,:), allocatable, public urban_sflx_lh
Definition: mod_urban_vars.F90:97
scale_file_cartesc::file_cartesc_flush
subroutine, public file_cartesc_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
Definition: scale_file_cartesC.F90:997
scale_landuse::landuse_exists_urban
logical, dimension(:,:), allocatable, public landuse_exists_urban
urban calculation flag
Definition: scale_landuse.F90:51
scale_time::time_gettimelabel
subroutine, public time_gettimelabel(timelabel)
generate time label
Definition: scale_time.F90:91
scale_cpl_sfc_index
module coupler / surface-atmospehre
Definition: scale_cpl_sfc_index.F90:11
mod_urban_vars::urban_rainb
real(rp), dimension(:,:), allocatable, public urban_rainb
Definition: mod_urban_vars.F90:70
scale_cpl_sfc_index::i_r_vis
integer, parameter, public i_r_vis
Definition: scale_cpl_sfc_index.F90:31
mod_urban_vars::urban_ah
real(rp), dimension(:,:), allocatable, public urban_ah
Definition: mod_urban_vars.F90:108
mod_urban_vars::urban_ahl
real(rp), dimension(:,:), allocatable, public urban_ahl
Definition: mod_urban_vars.F90:109
mod_urban_vars::urban_sflx_sh
real(rp), dimension(:,:), allocatable, public urban_sflx_sh
Definition: mod_urban_vars.F90:96
mod_urban_vars::urban_qc_t
real(rp), dimension(:,:), allocatable, public urban_qc_t
Definition: mod_urban_vars.F90:83
mod_urban_vars::urban_tr
real(rp), dimension(:,:), allocatable, public urban_tr
Definition: mod_urban_vars.F90:63
scale_file::file_get_aggregate
logical function, public file_get_aggregate(fid)
Definition: scale_file.F90:4844
scale_urban_grid_cartesc_index::uka
integer, public uka
Definition: scale_urban_grid_cartesC_index.F90:36
mod_urban_vars::urban_roff
real(rp), dimension(:,:), allocatable, public urban_roff
Definition: mod_urban_vars.F90:91
mod_urban_vars::urban_rainb_t
real(rp), dimension(:,:), allocatable, public urban_rainb_t
Definition: mod_urban_vars.F90:88
scale_urban_grid_cartesc_index::uis
integer, public uis
Definition: scale_urban_grid_cartesC_index.F90:41
mod_urban_vars::urban_ustar
real(rp), dimension(:,:), allocatable, public urban_ustar
Definition: mod_urban_vars.F90:112
mod_urban_vars::urban_zd
real(rp), dimension(:,:), allocatable, public urban_zd
Definition: mod_urban_vars.F90:107
scale_prof::prof_rapend
subroutine, public prof_rapend(rapname_base, level, disable_barrier)
Save raptime.
Definition: scale_prof.F90:217
mod_urban_vars::urban_sflx_qvex
real(rp), dimension(:,:), allocatable, public urban_sflx_qvex
Definition: mod_urban_vars.F90:99
scale_urban_grid_cartesc_real::urban_grid_cartesc_real_totarea
real(rp), public urban_grid_cartesc_real_totarea
total area
Definition: scale_urban_grid_cartesC_real.F90:37
mod_urban_vars::urban_uc_t
real(rp), dimension(:,:), allocatable, public urban_uc_t
Definition: mod_urban_vars.F90:82
mod_urban_vars::urban_rainr_t
real(rp), dimension(:,:), allocatable, public urban_rainr_t
Definition: mod_urban_vars.F90:87
mod_urban_vars::urban_tbl
real(rp), dimension(:,:,:), allocatable, public urban_tbl
Definition: mod_urban_vars.F90:61
scale_landuse
module LANDUSE
Definition: scale_landuse.F90:19
mod_urban_admin
module Urban admin
Definition: mod_urban_admin.F90:11
mod_urban_vars::urban_sflx_mw
real(rp), dimension(:,:), allocatable, public urban_sflx_mw
Definition: mod_urban_vars.F90:93
scale_cpl_sfc_index::n_rad_rgn
integer, parameter, public n_rad_rgn
Definition: scale_cpl_sfc_index.F90:28
mod_urban_vars::urban_restart_in_aggregate
logical, public urban_restart_in_aggregate
Switch to use aggregate file.
Definition: mod_urban_vars.F90:51
mod_urban_vars::atmos_sfc_dens
real(rp), dimension(:,:), allocatable, public atmos_sfc_dens
Definition: mod_urban_vars.F90:131
scale_urban_grid_cartesc_real
module urban / grid / cartesianC / real
Definition: scale_urban_grid_cartesC_real.F90:12
mod_urban_vars::urban_sflx_gh
real(rp), dimension(:,:), allocatable, public urban_sflx_gh
Definition: mod_urban_vars.F90:101
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:41
scale_urban_grid_cartesc_index::uje
integer, public uje
Definition: scale_urban_grid_cartesC_index.F90:46
mod_urban_vars::urban_rlmo
real(rp), dimension(:,:), allocatable, public urban_rlmo
Definition: mod_urban_vars.F90:116
mod_urban_vars::urban_restart_in_basename
character(len=h_long), public urban_restart_in_basename
Basename of the input file.
Definition: mod_urban_vars.F90:50
mod_urban_vars::urban_vars_restart_close
subroutine, public urban_vars_restart_close
Close restart file.
Definition: mod_urban_vars.F90:1182
scale_urban_grid_cartesc_index::ujs
integer, public ujs
Definition: scale_urban_grid_cartesC_index.F90:45
mod_urban_vars::urban_rainr
real(rp), dimension(:,:), allocatable, public urban_rainr
Definition: mod_urban_vars.F90:69
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:56
scale_file_cartesc
module file / cartesianC
Definition: scale_file_cartesC.F90:11
mod_urban_vars
module URBAN Variables
Definition: mod_urban_vars.F90:12
scale_atmos_hydrometeor::cv_water
real(rp), public cv_water
CV for water [J/kg/K].
Definition: scale_atmos_hydrometeor.F90:132
mod_urban_vars::urban_restart_out_postfix_timelabel
logical, public urban_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
Definition: mod_urban_vars.F90:55
mod_urban_vars::urban_restart_out_title
character(len=h_mid), public urban_restart_out_title
Title of the output file.
Definition: mod_urban_vars.F90:56
scale_urban_grid_cartesc_index::uie
integer, public uie
Definition: scale_urban_grid_cartesC_index.F90:42
scale_urban_grid_cartesc_index::uke
integer, public uke
Definition: scale_urban_grid_cartesC_index.F90:38
mod_urban_vars::atmos_temp
real(rp), dimension(:,:), allocatable, public atmos_temp
Definition: mod_urban_vars.F90:123
mod_urban_vars::urban_tc_t
real(rp), dimension(:,:), allocatable, public urban_tc_t
Definition: mod_urban_vars.F90:81
scale_urban_grid_cartesc_real::urban_grid_cartesc_real_area
real(rp), dimension(:,:), allocatable, public urban_grid_cartesc_real_area
area of grid cell
Definition: scale_urban_grid_cartesC_real.F90:36
scale_monitor
module MONITOR
Definition: scale_monitor.F90:12