81 integer,
private,
parameter :: vmax = 14
82 integer,
private,
parameter :: i_sflx_lw_up = 1
83 integer,
private,
parameter :: i_sflx_lw_dn = 2
84 integer,
private,
parameter :: i_sflx_sw_up = 3
85 integer,
private,
parameter :: i_sflx_sw_dn = 4
86 integer,
private,
parameter :: i_toaflx_lw_up = 5
87 integer,
private,
parameter :: i_toaflx_lw_dn = 6
88 integer,
private,
parameter :: i_toaflx_sw_up = 7
89 integer,
private,
parameter :: i_toaflx_sw_dn = 8
90 integer,
private,
parameter :: i_sflx_ir_dn_dir = 9
91 integer,
private,
parameter :: i_sflx_ir_dn_dif = 10
92 integer,
private,
parameter :: i_sflx_nir_dn_dir = 11
93 integer,
private,
parameter :: i_sflx_nir_dn_dif = 12
94 integer,
private,
parameter :: i_sflx_vis_dn_dir = 13
95 integer,
private,
parameter :: i_sflx_vis_dn_dif = 14
97 character(len=H_SHORT),
private :: var_name(vmax)
98 character(len=H_MID),
private :: var_desc(vmax)
99 character(len=H_MID),
private :: var_stdn(vmax)
100 character(len=H_SHORT),
private :: var_unit(vmax)
101 integer,
private :: var_id(vmax)
102 integer,
private :: restart_fid = -1
104 data var_name /
'SFLX_LW_up', &
118 data var_desc /
'surface upward longwave flux', &
119 'surface downward longwave flux', &
120 'surface upward shortwave flux', &
121 'surface downward shortwave flux', &
122 'TOA upward longwave flux', &
123 'TOA downward longwave flux', &
124 'TOA upward shortwave flux', &
125 'TOA downward shortwave flux', &
126 'sfc. down. flux direct IR', &
127 'sfc. down. flux diffuse IR', &
128 'sfc. down. flux direct NIR', &
129 'sfc. down. flux diffuse NIR', &
130 'sfc. down. flux direct VIS', &
131 'sfc. down. flux diffuse VIS' /
132 data var_stdn /
'surface_upwelling_longwave_flux_in_air', &
133 'surface_downwelling_longwave_flux_in_air', &
134 'surface_upwelling_shortwave_flux_in_air', &
135 'surface_downwelling_shortwave_flux_in_air', &
146 data var_unit /
'W/m2', &
172 namelist / param_atmos_phy_rd_vars / &
188 log_info(
"ATMOS_PHY_RD_vars_setup",*)
'Setup' 220 read(
io_fid_conf,nml=param_atmos_phy_rd_vars,iostat=ierr)
222 log_info(
"ATMOS_PHY_RD_vars_setup",*)
'Not found namelist. Default used.' 223 elseif( ierr > 0 )
then 224 log_error(
"ATMOS_PHY_RD_vars_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_RD_VARS. Check!' 227 log_nml(param_atmos_phy_rd_vars)
230 log_info(
"ATMOS_PHY_RD_vars_setup",*)
'[ATMOS_PHY_RD] prognostic/diagnostic variables' 231 log_info_cont(
'(1x,A,A24,A,A48,A,A12,A)') &
232 ' |',
'VARNAME ',
'|', &
233 'DESCRIPTION ',
'[',
'UNIT ',
']' 235 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
236 'NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']' 244 log_info(
"ATMOS_PHY_RD_vars_setup",*)
'Restart input? : NO' 251 log_info(
"ATMOS_PHY_RD_vars_setup",*)
'Restart output? : NO' 266 integer :: n ,idir, irgn
315 character(len=19) :: timelabel
316 character(len=H_LONG) :: basename
320 log_info(
"ATMOS_PHY_RD_vars_restart_open",*)
'Open restart file (ATMOS_PHY_RD) ' 331 log_info(
"ATMOS_PHY_RD_vars_restart_open",*)
'basename: ', trim(basename)
335 log_info(
"ATMOS_PHY_RD_vars_restart_open",*)
'restart file for ATMOS_PHY_RD is not specified.' 352 if ( restart_fid /= -1 )
then 354 log_info(
"ATMOS_PHY_RD_vars_restart_read",*)
'Read from restart file (ATMOS_PHY_RD) ' 356 call file_cartesc_read( restart_fid, var_name(i_sflx_lw_up),
'XY', &
358 call file_cartesc_read( restart_fid, var_name(i_sflx_lw_dn),
'XY', &
360 call file_cartesc_read( restart_fid, var_name(i_sflx_sw_up),
'XY', &
362 call file_cartesc_read( restart_fid, var_name(i_sflx_sw_dn),
'XY', &
364 call file_cartesc_read( restart_fid, var_name(i_toaflx_lw_up),
'XY', &
366 call file_cartesc_read( restart_fid, var_name(i_toaflx_lw_dn),
'XY', &
368 call file_cartesc_read( restart_fid, var_name(i_toaflx_sw_up),
'XY', &
370 call file_cartesc_read( restart_fid, var_name(i_toaflx_sw_dn),
'XY', &
372 call file_cartesc_read( restart_fid, var_name(i_sflx_ir_dn_dir),
'XY', &
374 call file_cartesc_read( restart_fid, var_name(i_sflx_ir_dn_dif),
'XY', &
376 call file_cartesc_read( restart_fid, var_name(i_sflx_nir_dn_dir),
'XY', &
378 call file_cartesc_read( restart_fid, var_name(i_sflx_nir_dn_dif),
'XY', &
380 call file_cartesc_read( restart_fid, var_name(i_sflx_vis_dn_dir),
'XY', &
382 call file_cartesc_read( restart_fid, var_name(i_sflx_vis_dn_dif),
'XY', &
394 log_info(
"ATMOS_PHY_RD_vars_restart_read",*)
'invalid restart file ID for ATMOS_PHY_RD.' 409 character(len=19) :: timelabel
410 character(len=H_LONG) :: basename
416 log_info(
"ATMOS_PHY_RD_vars_restart_create",*)
'Create restart file (ATMOS_PHY_AE) ' 425 log_info(
"ATMOS_PHY_RD_vars_restart_create",*)
'basename: ', trim(basename)
444 if ( restart_fid /= -1 )
then 459 if ( restart_fid /= -1 )
then 461 log_info(
"ATMOS_PHY_RD_vars_restart_close",*)
'Close restart file (ATMOS_PHY_RD) ' 481 if ( restart_fid /= -1 )
then 483 do i = i_sflx_lw_up, i_sflx_vis_dn_dif
485 var_name(i), var_desc(i), var_unit(i), &
488 standard_name=var_stdn(i) )
499 file_cartesc_write_var
503 if ( restart_fid /= -1 )
then 509 call file_cartesc_write_var( restart_fid, var_id(i_sflx_lw_up), &
511 var_name(i_sflx_lw_up),
'XY' )
512 call file_cartesc_write_var( restart_fid, var_id(i_sflx_lw_dn), &
514 var_name(i_sflx_lw_dn),
'XY' )
515 call file_cartesc_write_var( restart_fid, var_id(i_sflx_sw_up), &
517 var_name(i_sflx_sw_up),
'XY' )
518 call file_cartesc_write_var( restart_fid, var_id(i_sflx_sw_dn), &
520 var_name(i_sflx_sw_dn),
'XY' )
521 call file_cartesc_write_var( restart_fid, var_id(i_toaflx_lw_up), &
523 var_name(i_toaflx_lw_up),
'XY' )
524 call file_cartesc_write_var( restart_fid, var_id(i_toaflx_lw_dn), &
526 var_name(i_toaflx_lw_dn),
'XY' )
527 call file_cartesc_write_var( restart_fid, var_id(i_toaflx_sw_up), &
529 var_name(i_toaflx_sw_up),
'XY' )
530 call file_cartesc_write_var( restart_fid, var_id(i_toaflx_sw_dn), &
532 var_name(i_toaflx_sw_dn),
'XY' )
533 call file_cartesc_write_var( restart_fid, var_id(i_sflx_ir_dn_dir), &
535 var_name(i_sflx_ir_dn_dir),
'XY' )
536 call file_cartesc_write_var( restart_fid, var_id(i_sflx_ir_dn_dif), &
538 var_name(i_sflx_ir_dn_dif),
'XY' )
539 call file_cartesc_write_var( restart_fid, var_id(i_sflx_nir_dn_dir), &
541 var_name(i_sflx_nir_dn_dir),
'XY' )
542 call file_cartesc_write_var( restart_fid, var_id(i_sflx_nir_dn_dif), &
544 var_name(i_sflx_nir_dn_dif),
'XY' )
545 call file_cartesc_write_var( restart_fid, var_id(i_sflx_vis_dn_dir), &
547 var_name(i_sflx_vis_dn_dir),
'XY' )
548 call file_cartesc_write_var( restart_fid, var_id(i_sflx_vis_dn_dif), &
550 var_name(i_sflx_vis_dn_dif),
'XY' )
571 var_name(i_sflx_lw_up), &
576 var_name(i_sflx_lw_dn), &
581 var_name(i_sflx_sw_up), &
586 var_name(i_sflx_sw_dn), &
591 var_name(i_toaflx_lw_up), &
596 var_name(i_toaflx_lw_dn), &
601 var_name(i_toaflx_sw_up), &
606 var_name(i_toaflx_sw_dn), &
611 var_name(i_sflx_ir_dn_dir), &
616 var_name(i_sflx_ir_dn_dif), &
621 var_name(i_sflx_nir_dn_dir), &
626 var_name(i_sflx_nir_dn_dif), &
631 var_name(i_sflx_vis_dn_dir), &
636 var_name(i_sflx_vis_dn_dif), &
logical, public atmos_phy_rd_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
subroutine, public atmos_phy_rd_vars_restart_close
Close restart file.
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_down
subroutine, public atmos_phy_rd_vars_restart_create
Create restart file.
module coupler / surface-atmospehre
character(len=h_long), public atmos_phy_rd_restart_in_basename
Basename of the input file.
integer, public ia
of whole cells: x, local, with HALO
integer, parameter, public i_r_vis
character(len=h_mid), public atmos_phy_rd_restart_out_title
title of the output file
real(rp), dimension(:,:,:), allocatable, public atmos_phy_rd_rhoh
integer, public ja
of whole cells: y, local, with HALO
integer, public io_fid_conf
Config file ID.
integer, parameter, public n_rad_dir
integer, parameter, public n_rad_rgn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
logical, public statistics_checktotal
calc&report variable totals to logfile?
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_up
real(rp), public const_undef
logical, public atmos_phy_rd_restart_in_aggregate
Switch to use aggregate file.
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_cossza
module Atmosphere / Physics Radiation
character(len=h_long), public atmos_phy_rd_restart_out_basename
Basename of the output file.
subroutine, public atmos_phy_rd_vars_restart_open
Open restart file for read.
integer, public is
start point of inner domain: x, local
integer, public ie
end point of inner domain: x, local
logical, public atmos_phy_rd_restart_out_aggregate
Switch to use aggregate file.
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 atmos_phy_rd_sflx_sw_up
subroutine, public atmos_phy_rd_vars_restart_def_var
Define variables in restart file.
subroutine, public time_gettimelabel(timelabel)
generate time label
module atmosphere / grid / cartesC index
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_dn
integer, public je
end point of inner domain: y, local
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_dn
logical, public atmos_phy_rd_restart_output
output restart file?
subroutine, public atmos_phy_rd_vars_setup
Setup.
subroutine, public prc_abort
Abort Process.
integer, public js
start point of inner domain: y, local
integer, parameter, public i_r_direct
subroutine, public atmos_phy_rd_vars_restart_write
Write variables to restart file.
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.
character(len=h_short), public atmos_phy_rd_restart_out_dtype
REAL4 or REAL8.
logical function, public file_get_aggregate(fid)
integer, parameter, public i_r_nir
module Atmosphere GRID CartesC Real(real space)
subroutine, public atmos_phy_rd_vars_restart_enddef
Exit netCDF define mode.
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
integer, public ka
of whole cells: z, local, with HALO
subroutine, public atmos_phy_rd_vars_restart_read
Read restart.
subroutine, public atmos_phy_rd_vars_fillhalo
HALO Communication.
integer, parameter, public i_r_ir
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_phy_rd_solins
subroutine, public file_cartesc_open(basename, fid, aggregate)
open a netCDF file for read
subroutine atmos_phy_rd_vars_checktotal
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_up
logical, public atmos_phy_rd_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
real(rp), public atmos_grid_cartesc_real_totarea
total area (xy, local) [m2]