13 #include "inc_openmp.h" 81 integer,
private,
parameter :: vmax = 12
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_lw_dir = 9
91 integer,
private,
parameter :: i_sflx_lw_dif = 10
92 integer,
private,
parameter :: i_sflx_sw_dir = 11
93 integer,
private,
parameter :: i_sflx_sw_dif = 12
95 character(len=H_SHORT),
private :: var_name(vmax)
96 character(len=H_MID),
private :: var_desc(vmax)
97 character(len=H_SHORT),
private :: var_unit(vmax)
98 integer,
private :: var_id(vmax)
99 integer,
private :: restart_fid = -1
101 data var_name /
'SFLX_LW_up', &
113 data var_desc /
'surface upward longwave flux', &
114 'surface downward longwave flux', &
115 'surface upward shortwave flux', &
116 'surface downward shortwave flux', &
117 'TOA upward longwave flux', &
118 'TOA downward longwave flux', &
119 'TOA upward shortwave flux', &
120 'TOA downward shortwave flux', &
121 'sfc. down. longwave flux direct', &
122 'sfc. down. longwave flux diffuse', &
123 'sfc. down. shortwave flux direct', &
124 'sfc. down. shortwave flux diffuse' /
125 data var_unit /
'W/m2', &
149 namelist / param_atmos_phy_rd_vars / &
163 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[VARS] / Categ[ATMOS PHY_RD] / Origin[SCALE-RM]' 195 read(
io_fid_conf,nml=param_atmos_phy_rd_vars,iostat=ierr)
197 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 198 elseif( ierr > 0 )
then 199 write(*,*)
'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_RD_VARS. Check!' 205 if(
io_l )
write(
io_fid_log,*)
'*** [ATMOS_PHY_RD] prognostic/diagnostic variables' 207 '*** |',
'VARNAME ',
'|', &
208 'DESCRIPTION ',
'[',
'UNIT ',
']' 210 if(
io_l )
write(
io_fid_log,
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
211 '*** NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']' 290 character(len=19) :: timelabel
291 character(len=H_LONG) :: basename
295 if(
io_l )
write(
io_fid_log,*)
'*** Open restart file (ATMOS_PHY_RD) ***' 310 if(
io_l )
write(
io_fid_log,*)
'*** restart file for ATMOS_PHY_RD is not specified.' 331 if ( restart_fid /= -1 )
then 333 if(
io_l )
write(
io_fid_log,*)
'*** Read from restart file (ATMOS_PHY_RD) ***' 336 restart_fid, var_name(1) ,
'XY', step=1 )
338 restart_fid, var_name(2) ,
'XY', step=1 )
340 restart_fid, var_name(3) ,
'XY', step=1 )
342 restart_fid, var_name(4) ,
'XY', step=1 )
344 restart_fid, var_name(5) ,
'XY', step=1 )
346 restart_fid, var_name(6) ,
'XY', step=1 )
348 restart_fid, var_name(7) ,
'XY', step=1 )
350 restart_fid, var_name(8) ,
'XY', step=1 )
352 restart_fid, var_name(9) ,
'XY', step=1 )
354 restart_fid, var_name(10),
'XY', step=1 )
356 restart_fid, var_name(11),
'XY', step=1 )
358 restart_fid, var_name(12),
'XY', step=1 )
381 if(
io_l )
write(
io_fid_log,*)
'*** invalid restart file ID for ATMOS_PHY_RD.' 393 real(RP),
intent(in) :: init_value_in
421 character(len=19) :: timelabel
422 character(len=H_LONG) :: basename
428 if(
io_l )
write(
io_fid_log,*)
'*** Create restart file (ATMOS_PHY_AE) ***' 454 if ( restart_fid /= -1 )
then 469 if ( restart_fid /= -1 )
then 471 if(
io_l )
write(
io_fid_log,*)
'*** Close restart file (ATMOS_PHY_RD) ***' 489 if ( restart_fid /= -1 )
then 491 call fileio_def_var( restart_fid, var_id(1), var_name(1) , var_desc(1) , var_unit(1) , &
493 call fileio_def_var( restart_fid, var_id(2), var_name(2) , var_desc(2) , var_unit(2) , &
495 call fileio_def_var( restart_fid, var_id(3), var_name(3) , var_desc(3) , var_unit(3) , &
497 call fileio_def_var( restart_fid, var_id(4), var_name(4) , var_desc(4) , var_unit(4) , &
499 call fileio_def_var( restart_fid, var_id(5), var_name(5) , var_desc(5) , var_unit(5) , &
501 call fileio_def_var( restart_fid, var_id(6), var_name(6) , var_desc(6) , var_unit(6) , &
503 call fileio_def_var( restart_fid, var_id(7), var_name(7) , var_desc(7) , var_unit(7) , &
505 call fileio_def_var( restart_fid, var_id(8), var_name(8) , var_desc(8) , var_unit(8) , &
507 call fileio_def_var( restart_fid, var_id(9), var_name(9) , var_desc(9) , var_unit(9) , &
509 call fileio_def_var( restart_fid, var_id(10), var_name(10), var_desc(10), var_unit(10), &
511 call fileio_def_var( restart_fid, var_id(11), var_name(11), var_desc(11), var_unit(11), &
513 call fileio_def_var( restart_fid, var_id(12), var_name(12), var_desc(12), var_unit(12), &
534 if ( restart_fid /= -1 )
then logical, public atmos_phy_rd_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
logical, public statistics_checktotal
calc&report variable totals to logfile?
subroutine, public atmos_phy_rd_vars_restart_close
Close restart file.
subroutine, public atmos_phy_rd_vars_restart_create
Create restart file.
subroutine, public prc_mpistop
Abort MPI.
character(len=h_long), public atmos_phy_rd_restart_in_basename
Basename of the input file.
subroutine, public atmos_phy_rd_vars_external_in(init_value_in)
Input from External I/O.
logical, public io_l
output log or not? (this process)
character(len=h_mid), public atmos_phy_rd_restart_out_title
title of the output file
subroutine, public fileio_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
real(rp), dimension(:,:,:), allocatable, public atmos_phy_rd_rhot_t
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_up
real(rp), public const_undef
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.
logical, public io_nml
output log or not? (for namelist, this process)
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_up
integer, public ia
of whole cells: x, local, with HALO
subroutine, public atmos_phy_rd_vars_restart_def_var
Define variables in restart file.
subroutine, public time_gettimelabel(timelabel)
generate time label
integer, public ka
of whole cells: z, local, with HALO
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_dn
subroutine, public fileio_create(fid, basename, title, datatype, date, subsec, append, nozcoord)
Create/open a netCDF file.
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 atmos_phy_rd_vars_restart_write
Write variables to restart file.
character(len=h_short), public atmos_phy_rd_restart_out_dtype
REAL4 or REAL8.
subroutine, public fileio_enddef(fid)
Exit netCDF file define mode.
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_downall
subroutine, public atmos_phy_rd_vars_restart_enddef
Exit netCDF define mode.
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_dn
logical, public io_aggregate
do parallel I/O through PnetCDF
subroutine, public fileio_open(fid, basename)
open a netCDF file for read
subroutine, public fileio_def_var(fid, vid, varname, desc, unit, axistype, datatype, timeintv, nsteps)
Define a variable to file.
subroutine, public atmos_phy_rd_vars_restart_read
Read restart.
subroutine, public atmos_phy_rd_vars_fillhalo
HALO Communication.
subroutine, public fileio_close(fid)
Close a netCDF file.
integer, public io_fid_conf
Config file ID.
integer, public io_fid_log
Log file ID.
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_solins
integer, public io_fid_nml
Log file ID (only for output namelist)
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?
integer, public ja
of whole cells: y, local, with HALO