59 real(RP),
public,
allocatable ::
urban_tr (:,:)
60 real(RP),
public,
allocatable ::
urban_tb (:,:)
61 real(RP),
public,
allocatable ::
urban_tg (:,:)
62 real(RP),
public,
allocatable ::
urban_tc (:,:)
63 real(RP),
public,
allocatable ::
urban_qc (:,:)
64 real(RP),
public,
allocatable ::
urban_uc (:,:)
111 real(RP),
public,
allocatable ::
atmos_w (:,:)
112 real(RP),
public,
allocatable ::
atmos_u (:,:)
113 real(RP),
public,
allocatable ::
atmos_v (:,:)
133 logical,
private :: urban_vars_checkrange = .false.
135 integer,
private,
parameter :: vmax = 27
136 integer,
private,
parameter :: i_tr = 1
137 integer,
private,
parameter :: i_tb = 2
138 integer,
private,
parameter :: i_tg = 3
139 integer,
private,
parameter :: i_tc = 4
140 integer,
private,
parameter :: i_qc = 5
141 integer,
private,
parameter :: i_uc = 6
142 integer,
private,
parameter :: i_trl = 7
143 integer,
private,
parameter :: i_tbl = 8
144 integer,
private,
parameter :: i_tgl = 9
145 integer,
private,
parameter :: i_rainr = 10
146 integer,
private,
parameter :: i_rainb = 11
147 integer,
private,
parameter :: i_raing = 12
148 integer,
private,
parameter :: i_roff = 13
149 integer,
private,
parameter :: i_sfc_temp = 14
150 integer,
private,
parameter :: i_sfc_alb_ir_dir = 15
151 integer,
private,
parameter :: i_sfc_alb_ir_dif = 16
152 integer,
private,
parameter :: i_sfc_alb_nir_dir = 17
153 integer,
private,
parameter :: i_sfc_alb_nir_dif = 18
154 integer,
private,
parameter :: i_sfc_alb_vis_dir = 19
155 integer,
private,
parameter :: i_sfc_alb_vis_dif = 20
156 integer,
private,
parameter :: i_sflx_mw = 21
157 integer,
private,
parameter :: i_sflx_mu = 22
158 integer,
private,
parameter :: i_sflx_mv = 23
159 integer,
private,
parameter :: i_sflx_sh = 24
160 integer,
private,
parameter :: i_sflx_lh = 25
161 integer,
private,
parameter :: i_sflx_gh = 26
162 integer,
private,
parameter :: i_sflx_evap = 27
164 character(len=H_SHORT),
private :: var_name(vmax)
165 character(len=H_MID),
private :: var_desc(vmax)
166 character(len=H_MID),
private :: var_stdn(vmax)
167 character(len=H_SHORT),
private :: var_unit(vmax)
168 integer,
private :: var_id(vmax)
169 integer,
private :: restart_fid = -1
171 data var_name /
'URBAN_TR', &
185 'URBAN_SFC_ALB_IR_dir', &
186 'URBAN_SFC_ALB_IR_dif', &
187 'URBAN_SFC_ALB_NIR_dir', &
188 'URBAN_SFC_ALB_NIR_dif', &
189 'URBAN_SFC_ALB_VIS_dir', &
190 'URBAN_SFC_ALB_VIS_dif', &
199 data var_desc /
'urban surface temperature of roof', &
200 'urban surface temperature of wall', &
201 'urban surface temperature of road', &
202 'urban canopy air temperature', &
203 'urban canopy humidity', &
204 'urban canopy wind', &
205 'urban temperature in layer of roof', &
206 'urban temperature in layer of wall', &
207 'urban temperature in layer of road', &
208 'urban rain strage on roof', &
209 'urban rain strage on wall', &
210 'urban rain strage on road', &
212 'urban grid average of temperature', &
213 'urban grid average of albedo for IR (direct)', &
214 'urban grid average of albedo for IR (diffuse)', &
215 'urban grid average of albedo for NIR (direct)', &
216 'urban grid average of albedo for NIR (diffuse)', &
217 'urban grid average of albedo for VIS (direct)', &
218 'urban grid average of albedo for VIS (diffuse)', &
219 'urban grid average of w-momentum flux', &
220 'urban grid average of u-momentum flux', &
221 'urban grid average of v-momentum flux', &
222 'urban grid average of sensible heat flux (upward)', &
223 'urban grid average of latent heat flux (upward)', &
224 'urban grid average of subsurface heat flux (downward)', &
225 'urban grid average of water vapor flux (upward)' /
227 data var_stdn /
'', &
255 data var_unit /
'K', &
284 logical,
private :: urban_restart_in_check_coordinates = .true.
297 namelist / param_urban_vars / &
301 urban_restart_in_check_coordinates, &
308 urban_vars_checkrange
315 log_info(
"URBAN_vars_setup",*)
'Setup' 440 log_info(
"URBAN_vars_setup",*)
'Not found namelist. Default used.' 441 elseif( ierr > 0 )
then 442 log_error(
"URBAN_vars_setup",*)
'Not appropriate names in namelist PARAM_URBAN_VARS. Check!' 445 log_nml(param_urban_vars)
448 log_info(
"URBAN_vars_setup",*)
'List of prognostic variables (URBAN) ' 449 log_info_cont(
'(1x,A,A24,A,A48,A,A12,A)') &
450 ' |',
'VARNAME ',
'|', &
451 'DESCRIPTION ',
'[',
'UNIT ',
']' 453 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
454 'NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']' 462 log_info(
"URBAN_vars_setup",*)
'Restart input? : NO' 469 log_info(
"URBAN_vars_setup",*)
'Restart output? : NO' 483 file_cartesc_check_coordinates
488 character(len=19) :: timelabel
489 character(len=H_LONG) :: basename
493 log_info(
"URBAN_vars_restart_open",*)
'Open restart file (URBAN) ' 504 log_info(
"URBAN_vars_restart_open",*)
'basename: ', trim(basename)
508 if ( urban_restart_in_check_coordinates )
then 509 call file_cartesc_check_coordinates( restart_fid, urban=.true. )
513 log_info(
"URBAN_vars_restart_open",*)
'restart file for urban is not specified.' 532 if ( restart_fid /= -1 )
then 534 log_info(
"URBAN_vars_restart_read",*)
'Read from restart file (URBAN) ' 536 call file_cartesc_read( restart_fid, var_name(i_tr),
'XY', &
538 call file_cartesc_read( restart_fid, var_name(i_tb),
'XY', &
540 call file_cartesc_read( restart_fid, var_name(i_tg),
'XY', &
542 call file_cartesc_read( restart_fid, var_name(i_tc),
'XY', &
544 call file_cartesc_read( restart_fid, var_name(i_qc),
'XY', &
546 call file_cartesc_read( restart_fid, var_name(i_uc),
'XY', &
549 call file_cartesc_read( restart_fid, var_name(i_trl),
'UXY', &
551 call file_cartesc_read( restart_fid, var_name(i_tbl),
'UXY', &
553 call file_cartesc_read( restart_fid, var_name(i_tgl),
'UXY', &
556 call file_cartesc_read( restart_fid, var_name(i_rainr),
'XY', &
558 call file_cartesc_read( restart_fid, var_name(i_rainb),
'XY', &
560 call file_cartesc_read( restart_fid, var_name(i_raing),
'XY', &
562 call file_cartesc_read( restart_fid, var_name(i_roff),
'XY', &
565 call file_cartesc_read( restart_fid, var_name(i_sfc_temp),
'XY', &
567 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_ir_dir),
'XY', &
569 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_ir_dif),
'XY', &
571 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_nir_dir),
'XY', &
573 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_nir_dif),
'XY', &
575 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_vis_dir),
'XY', &
577 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_vis_dif),
'XY', &
584 log_error(
"URBAN_vars_restart_read",*)
'invalid restart file ID for urban.' 603 if ( urban_vars_checkrange )
then 631 var_name(i_sfc_temp), __file__, __line__ )
633 var_name(i_sfc_alb_ir_dir ), __file__, __line__ )
635 var_name(i_sfc_alb_ir_dif ), __file__, __line__ )
637 var_name(i_sfc_alb_nir_dir), __file__, __line__ )
639 var_name(i_sfc_alb_nir_dif), __file__, __line__ )
641 var_name(i_sfc_alb_vis_dir), __file__, __line__ )
643 var_name(i_sfc_alb_vis_dif), __file__, __line__ )
646 call file_history_in(
urban_tr(:,:), var_name(i_tr), var_desc(i_tr), var_unit(i_tr) )
647 call file_history_in(
urban_tb(:,:), var_name(i_tb), var_desc(i_tb), var_unit(i_tb) )
648 call file_history_in(
urban_tg(:,:), var_name(i_tg), var_desc(i_tg), var_unit(i_tg) )
649 call file_history_in(
urban_tc(:,:), var_name(i_tc), var_desc(i_tc), var_unit(i_tc) )
650 call file_history_in(
urban_qc(:,:), var_name(i_qc), var_desc(i_qc), var_unit(i_qc) )
651 call file_history_in(
urban_uc(:,:), var_name(i_uc), var_desc(i_uc), var_unit(i_uc) )
653 call file_history_in(
urban_trl(:,:,:), var_name(i_trl), var_desc(i_trl), var_unit(i_trl), dim_type=
'UXY' )
654 call file_history_in(
urban_tbl(:,:,:), var_name(i_tbl), var_desc(i_tbl), var_unit(i_tbl), dim_type=
'UXY' )
655 call file_history_in(
urban_tgl(:,:,:), var_name(i_tgl), var_desc(i_tgl), var_unit(i_tgl), dim_type=
'UXY' )
657 call file_history_in(
urban_rainr(:,:), var_name(i_rainr), var_desc(i_rainr), var_unit(i_rainr) )
658 call file_history_in(
urban_rainb(:,:), var_name(i_rainb), var_desc(i_rainb), var_unit(i_rainb) )
659 call file_history_in(
urban_raing(:,:), var_name(i_raing), var_desc(i_raing), var_unit(i_raing) )
660 call file_history_in(
urban_roff(:,:), var_name(i_roff), var_desc(i_roff), var_unit(i_roff) )
662 call file_history_in(
urban_sfc_temp(:,:), var_name(i_sfc_temp), &
663 var_desc(i_sfc_temp), var_unit(i_sfc_temp), standard_name=var_stdn(i_sfc_temp) )
665 var_desc(i_sfc_alb_ir_dir), var_unit(i_sfc_alb_ir_dir), standard_name=var_stdn(i_sfc_alb_ir_dir) )
667 var_desc(i_sfc_alb_ir_dif), var_unit(i_sfc_alb_ir_dif), standard_name=var_stdn(i_sfc_alb_ir_dif) )
669 var_desc(i_sfc_alb_nir_dir), var_unit(i_sfc_alb_nir_dir), standard_name=var_stdn(i_sfc_alb_nir_dir) )
671 var_desc(i_sfc_alb_nir_dif), var_unit(i_sfc_alb_nir_dif), standard_name=var_stdn(i_sfc_alb_nir_dif) )
673 var_desc(i_sfc_alb_vis_dir), var_unit(i_sfc_alb_vis_dir), standard_name=var_stdn(i_sfc_alb_vis_dir) )
675 var_desc(i_sfc_alb_vis_dif), var_unit(i_sfc_alb_vis_dif), standard_name=var_stdn(i_sfc_alb_vis_dif) )
677 call file_history_in(
urban_sflx_mw(:,:), var_name(i_sflx_mw), var_desc(i_sflx_mw), var_unit(i_sflx_mw) )
678 call file_history_in(
urban_sflx_mu(:,:), var_name(i_sflx_mu), var_desc(i_sflx_mu), var_unit(i_sflx_mu) )
679 call file_history_in(
urban_sflx_mv(:,:), var_name(i_sflx_mv), var_desc(i_sflx_mv), var_unit(i_sflx_mv) )
680 call file_history_in(
urban_sflx_sh(:,:), var_name(i_sflx_sh), var_desc(i_sflx_sh), var_unit(i_sflx_sh) )
681 call file_history_in(
urban_sflx_lh(:,:), var_name(i_sflx_lh), var_desc(i_sflx_lh), var_unit(i_sflx_lh) )
682 call file_history_in(
urban_sflx_gh(:,:), var_name(i_sflx_gh), var_desc(i_sflx_gh), var_unit(i_sflx_gh) )
684 call file_history_in(
urban_sflx_qtrc(:,:,
i_qv), var_name(i_sflx_evap), var_desc(i_sflx_evap), var_unit(i_sflx_evap) )
843 character(len=19) :: timelabel
844 character(len=H_LONG) :: basename
850 log_info(
"URBAN_vars_restart_create",*)
'Create restart file (URBAN) ' 859 log_info(
"URBAN_vars_restart_create",*)
'basename: ', trim(basename)
878 if ( restart_fid /= -1 )
then 893 if ( restart_fid /= -1 )
then 895 log_info(
"URBAN_vars_restart_close",*)
'Close restart file (URBAN) ' 915 if ( restart_fid /= -1 )
then 917 do i = i_tr, i_sfc_alb_vis_dif
918 if ( i==i_trl .or. i==i_tbl .or. i==i_tgl )
then 920 var_name(i), var_desc(i), var_unit(i), &
925 var_name(i), var_desc(i), var_unit(i), &
940 file_cartesc_write_var
944 if ( restart_fid /= -1 )
then 948 call file_cartesc_write_var( restart_fid, var_id(i_tr),
urban_tr(:,:), &
949 var_name(i_tr),
'XY', fill_halo=.true. )
950 call file_cartesc_write_var( restart_fid, var_id(i_tb),
urban_tb(:,:), &
951 var_name(i_tb),
'XY', fill_halo=.true. )
952 call file_cartesc_write_var( restart_fid, var_id(i_tg),
urban_tg(:,:), &
953 var_name(i_tg),
'XY', fill_halo=.true. )
954 call file_cartesc_write_var( restart_fid, var_id(i_tc),
urban_tc(:,:), &
955 var_name(i_tc),
'XY', fill_halo=.true. )
956 call file_cartesc_write_var( restart_fid, var_id(i_qc),
urban_qc(:,:), &
957 var_name(i_qc),
'XY', fill_halo=.true. )
958 call file_cartesc_write_var( restart_fid, var_id(i_uc),
urban_uc(:,:), &
959 var_name(i_uc),
'XY', fill_halo=.true. )
961 call file_cartesc_write_var( restart_fid, var_id(i_trl),
urban_trl(:,:,:), &
962 var_name(i_trl),
'UXY', fill_halo=.true. )
963 call file_cartesc_write_var( restart_fid, var_id(i_tbl),
urban_tbl(:,:,:), &
964 var_name(i_tbl),
'UXY', fill_halo=.true. )
965 call file_cartesc_write_var( restart_fid, var_id(i_tgl),
urban_tgl(:,:,:), &
966 var_name(i_tgl),
'UXY', fill_halo=.true. )
968 call file_cartesc_write_var( restart_fid, var_id(i_rainr),
urban_rainr(:,:), &
969 var_name(i_rainr),
'XY', fill_halo=.true. )
970 call file_cartesc_write_var( restart_fid, var_id(i_rainb),
urban_rainb(:,:), &
971 var_name(i_rainb),
'XY', fill_halo=.true. )
972 call file_cartesc_write_var( restart_fid, var_id(i_raing),
urban_raing(:,:), &
973 var_name(i_raing),
'XY', fill_halo=.true. )
974 call file_cartesc_write_var( restart_fid, var_id(i_roff),
urban_roff(:,:), &
975 var_name(i_roff),
'XY', fill_halo=.true. )
977 call file_cartesc_write_var( restart_fid, var_id(i_sfc_temp), &
979 var_name(i_sfc_temp),
'XY', fill_halo=.true. )
980 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_ir_dir), &
982 var_name(i_sfc_alb_ir_dir),
'XY', fill_halo=.true. )
983 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_ir_dif), &
985 var_name(i_sfc_alb_ir_dif),
'XY', fill_halo=.true. )
986 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_nir_dir), &
988 var_name(i_sfc_alb_nir_dir),
'XY', fill_halo=.true. )
989 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_nir_dif), &
991 var_name(i_sfc_alb_nir_dif),
'XY', fill_halo=.true. )
992 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_vis_dir), &
994 var_name(i_sfc_alb_vis_dir),
'XY', fill_halo=.true. )
995 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_vis_dif), &
997 var_name(i_sfc_alb_vis_dif),
'XY', fill_halo=.true. )
real(rp), dimension(:,:), allocatable, public urban_qc_t
real(rp), dimension(:,:,:), allocatable, public urban_sflx_qtrc
real(rp), dimension(:,:), allocatable, public urban_qc
real(rp), dimension(:,:), allocatable, public urban_rainr_t
module coupler / surface-atmospehre
real(rp), dimension(:,:,:), allocatable, public urban_trl_t
real(rp), dimension(:,:), allocatable, public urban_tg_t
real(rp), dimension(:,:), allocatable, public urban_u10
subroutine, public urban_vars_restart_create
Create urban restart file.
real(rp), dimension(:,:), allocatable, public urban_v10
integer, parameter, public i_r_vis
real(rp), public urban_grid_cartesc_real_totarea
total area
real(rp), dimension(:,:), allocatable, public urban_raing_t
real(rp), dimension(:,:), allocatable, public urban_z0e
real(rp), dimension(:,:), allocatable, public urban_sflx_mu
subroutine, public urban_vars_restart_enddef
Exit netCDF define mode.
real(rp), dimension(:,:), allocatable, public urban_z0m
subroutine, public urban_vars_total
Budget monitor for urban.
subroutine, public urban_vars_restart_read
Read urban restart.
real(rp), dimension(:,:), allocatable, public urban_tb_t
real(rp), dimension(:,:), allocatable, public urban_t2
subroutine, public urban_vars_history
History output set for urban variables.
integer, public io_fid_conf
Config file ID.
real(rp), dimension(:,:), allocatable, public urban_tb
logical, public urban_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
integer, parameter, public n_rad_dir
integer, parameter, public n_rad_rgn
real(rp), dimension(:,:), allocatable, public urban_raing
logical, public statistics_checktotal
calc&report variable totals to logfile?
module urban / grid / icosahedralA / index
real(rp), dimension(:,:), allocatable, public urban_uc
real(rp), public const_undef
real(rp), dimension(:,:,:,:), allocatable, public urban_sfc_albedo
character(len=h_short), public urban_restart_out_dtype
REAL4 or REAL8.
subroutine, public urban_vars_restart_write
Write urban restart.
real(rp), dimension(:,:,:), allocatable, public urban_grid_cartesc_real_vol
volume of grid cell
subroutine, public urban_vars_restart_close
Close restart file.
real(rp), dimension(:,:), allocatable, public atmos_pbl
subroutine, public file_cartesc_create(basename, title, datatype, fid, date, subsec, haszcoord, append, aggregate, single)
Create/open a netCDF file.
real(rp), dimension(:,:), allocatable, public urban_sflx_sh
character(len=h_long), public urban_restart_out_basename
Basename of the output file.
real(rp), dimension(:,:), allocatable, public urban_tr
real(rp), dimension(:,:,:), allocatable, public urban_tgl
real(rp), public urban_grid_cartesc_real_totvol
total volume
module atmosphere / hydrometeor
subroutine, public time_gettimelabel(timelabel)
generate time label
real(rp), dimension(:,:), allocatable, public atmos_qv
real(rp), dimension(:,:), allocatable, public atmos_sfc_pres
real(rp), dimension(:,:), allocatable, public atmos_cossza
real(rp), dimension(:,:), allocatable, public urban_uc_t
real(rp), dimension(:,:), allocatable, public urban_z0h
real(rp), dimension(:,:,:), allocatable, public atmos_sflx_sw
real(rp), dimension(:,:), allocatable, public atmos_v
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
real(rp), dimension(:,:), allocatable, public urban_roff
logical, public urban_restart_out_aggregate
Switch to use aggregate file.
real(rp), dimension(:,:), allocatable, public atmos_dens
real(rp), dimension(:,:), allocatable, public urban_grid_cartesc_real_area
area of grid cell
real(rp), dimension(:,:), allocatable, public atmos_sflx_rain
subroutine, public prc_abort
Abort Process.
subroutine, public urban_vars_setup
Setup.
integer, parameter, public i_r_direct
real(rp), dimension(:,:), allocatable, public urban_sflx_lh
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.
real(rp), dimension(:,:), allocatable, public urban_tc
real(rp), dimension(:,:), allocatable, public atmos_pres
logical, public urban_restart_output
Output restart file?
logical function, public file_get_aggregate(fid)
real(rp), dimension(:,:), allocatable, public urban_rainr
subroutine, public prof_rapstart(rapname_base, level)
Start raptime.
subroutine, public urban_vars_restart_open
Open urban restart file for read.
integer, parameter, public i_r_nir
logical, public urban_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
logical, public urban_restart_in_aggregate
Switch to use aggregate file.
real(rp), dimension(:,:), allocatable, public atmos_temp
real(rp), dimension(:,:), allocatable, public urban_q2
module urban / grid / cartesianC / real
real(rp), dimension(:,:), allocatable, public urban_tg
real(rp), dimension(:,:), allocatable, public atmos_u
subroutine, public urban_vars_restart_def_var
Define urban variables in restart file.
real(rp), dimension(:,:), allocatable, public urban_sfc_temp
real(rp), dimension(:,:,:), allocatable, public urban_trl
integer, parameter, public i_r_ir
real(rp), dimension(:,:), allocatable, public urban_rainb_t
integer, parameter, public i_r_diffuse
subroutine, public file_cartesc_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
real(rp), dimension(:,:,:), allocatable, public atmos_sflx_lw
subroutine, public prof_rapend(rapname_base, level)
Save raptime.
real(rp), dimension(:,:), allocatable, public atmos_sflx_snow
real(rp), dimension(:,:,:), allocatable, public urban_tbl
subroutine, public file_cartesc_open(basename, fid, aggregate)
open a netCDF file for read
real(rp), dimension(:,:), allocatable, public urban_tr_t
real(rp), dimension(:,:,:), allocatable, public urban_tgl_t
real(rp), dimension(:,:), allocatable, public urban_sflx_gh
real(rp), dimension(:,:), allocatable, public urban_sflx_mv
real(rp), dimension(:,:), allocatable, public atmos_w
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
real(rp), dimension(:,:), allocatable, public urban_rainb
real(rp), dimension(:,:), allocatable, public urban_tc_t
character(len=h_long), public urban_restart_in_basename
Basename of the input file.
real(rp), dimension(:,:), allocatable, public urban_roff_t
real(rp), dimension(:,:,:), allocatable, public urban_tbl_t
real(rp), dimension(:,:), allocatable, public urban_sflx_mw
real(rp), dimension(:,:), allocatable, public atmos_sfc_dens
character(len=h_mid), public urban_restart_out_title
Title of the output file.