99 integer,
private,
parameter :: vmax = 6
100 integer,
private,
parameter :: i_sfc_temp = 1
101 integer,
private,
parameter :: i_sfc_albedo_lw = 2
102 integer,
private,
parameter :: i_sfc_albedo_sw = 3
103 integer,
private,
parameter :: i_sfc_z0m = 4
104 integer,
private,
parameter :: i_sfc_z0h = 5
105 integer,
private,
parameter :: i_sfc_z0e = 6
107 character(len=H_SHORT),
private :: var_name(vmax)
108 character(len=H_MID),
private :: var_desc(vmax)
109 character(len=H_SHORT),
private :: var_unit(vmax)
110 integer,
private :: var_id(vmax)
111 integer,
private :: restart_fid = -1
113 data var_name /
'SFC_TEMP', &
120 data var_desc /
'surface skin temperature', &
121 'surface albedo for longwave', &
122 'surface albedo for shortwave', &
123 'surface roughness length (momentum)', &
124 'surface roughness length (heat)', &
125 'surface roughness length (vapor)' /
127 data var_unit /
'K', &
134 real(RP),
private :: atmos_phy_sf_default_sfc_temp = 300.0_rp
135 real(RP),
private :: atmos_phy_sf_default_sfc_albedo = 0.4_rp
136 real(RP),
private :: atmos_phy_sf_default_sfc_z0 = 1e-4_rp
149 namelist / param_atmos_phy_sf_vars / &
157 atmos_phy_sf_default_sfc_temp, &
158 atmos_phy_sf_default_sfc_albedo, &
159 atmos_phy_sf_default_sfc_z0
166 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[VARS] / Categ[ATMOS PHY_SF] / Origin[SCALE-RM]' 223 read(
io_fid_conf,nml=param_atmos_phy_sf_vars,iostat=ierr)
225 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 226 elseif( ierr > 0 )
then 227 write(*,*)
'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_SF_VARS. Check!' 240 if(
io_l )
write(
io_fid_log,*)
'*** [ATMOS_PHY_SF] prognostic/diagnostic variables' 242 '*** |',
'VARNAME ',
'|', &
243 'DESCRIPTION ',
'[',
'UNIT ',
']' 245 if(
io_l )
write(
io_fid_log,
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
246 '*** NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']' 306 character(len=19) :: timelabel
307 character(len=H_LONG) :: basename
311 if(
io_l )
write(
io_fid_log,*)
'*** Open restart file (ATMOS_PHY_SF) ***' 327 if(
io_l )
write(
io_fid_log,*)
'*** restart file for ATMOS_PHY_SF is not specified.' 355 if ( restart_fid /= -1 )
then 357 if(
io_l )
write(
io_fid_log,*)
'*** Read from restart file (ATMOS_PHY_SF) ***' 360 restart_fid, var_name(1),
'XY', step=1 )
362 restart_fid, var_name(2),
'XY', step=1 )
364 restart_fid, var_name(3),
'XY', step=1 )
366 restart_fid, var_name(4),
'XY', step=1 )
368 restart_fid, var_name(5),
'XY', step=1 )
370 restart_fid, var_name(6),
'XY', step=1 )
387 if(
io_l )
write(
io_fid_log,*)
'*** invalid restart file ID for ATMOS_PHY_SF.' 407 real(RP),
intent(in) :: sfc_temp_in (:,:)
408 real(RP),
intent(in) :: albedo_lw_in(:,:)
409 real(RP),
intent(in) :: albedo_sw_in(:,:)
410 real(RP),
intent(in) :: sfc_z0m_in (:,:)
411 real(RP),
intent(in) :: sfc_z0h_in (:,:)
412 real(RP),
intent(in) :: sfc_z0e_in (:,:)
439 character(len=19) :: timelabel
440 character(len=H_LONG) :: basename
446 if(
io_l )
write(
io_fid_log,*)
'*** Create restart file (ATMOS_PHY_AE) ***' 471 if ( restart_fid /= -1 )
then 486 if ( restart_fid /= -1 )
then 488 if(
io_l )
write(
io_fid_log,*)
'*** Close restart file (ATMOS_PHY_SF) ***' 506 if ( restart_fid /= -1 )
then 508 call fileio_def_var( restart_fid, var_id(1), var_name(1), var_desc(1), &
510 call fileio_def_var( restart_fid, var_id(2), var_name(2), var_desc(2), &
512 call fileio_def_var( restart_fid, var_id(3), var_name(3), var_desc(3), &
514 call fileio_def_var( restart_fid, var_id(4), var_name(4), var_desc(4), &
516 call fileio_def_var( restart_fid, var_id(5), var_name(5), var_desc(5), &
518 call fileio_def_var( restart_fid, var_id(6), var_name(6), var_desc(6), &
541 if ( restart_fid /= -1 )
then subroutine, public atmos_phy_sf_vars_restart_def_var
Write restart.
subroutine, public atmos_phy_sf_vars_restart_open
Open restart file for read.
logical, public statistics_checktotal
calc&report variable totals to logfile?
subroutine, public atmos_phy_sf_vars_restart_read
Read restart.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0e
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_momz_t
integer, public const_i_lw
long-wave radiation index
real(rp), dimension(:,:,:), allocatable, public atmos_phy_sf_sflx_qtrc
subroutine, public atmos_phy_sf_vars_external_in(sfc_temp_in, albedo_lw_in, albedo_sw_in, sfc_z0m_in, sfc_z0h_in, sfc_z0e_in)
Input from External I/O.
subroutine, public prc_mpistop
Abort MPI.
character(len=h_long), public atmos_phy_sf_restart_out_basename
Basename of the output file.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mw
real(rp), dimension(:,:,:), allocatable, public atmos_phy_sf_rhoq_t
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_v10
logical, public io_l
output log or not? (this process)
subroutine, public fileio_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhot_t
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_temp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mv
subroutine, public atmos_phy_sf_vars_restart_enddef
Exit netCDF define mode.
subroutine, public atmos_phy_sf_vars_setup
Setup.
real(rp), public const_undef
module ATMOSPHERIC Surface Variables
subroutine, public atmos_phy_sf_vars_restart_write
Write variables to restart file.
subroutine, public atmos_phy_sf_vars_restart_close
Close restart file.
logical, public io_nml
output log or not? (for namelist, this process)
integer, public ia
of whole cells: x, local, with HALO
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_u10
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_momx_t
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_dens_t
subroutine, public atmos_phy_sf_vars_fillhalo
HALO Communication.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0h
subroutine, public time_gettimelabel(timelabel)
generate time label
real(rp), dimension(:,:,:), allocatable, public atmos_phy_sf_sfc_albedo
subroutine, public fileio_create(fid, basename, title, datatype, date, subsec, append, nozcoord)
Create/open a netCDF file.
character(len=h_long), public atmos_phy_sf_restart_in_basename
Basename of the input file.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_lh
character(len=h_short), public atmos_phy_sf_restart_out_dtype
REAL4 or REAL8.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_pres
character(len=h_mid), public atmos_phy_sf_restart_out_title
title of the output file
logical, public atmos_phy_sf_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
subroutine, public fileio_enddef(fid)
Exit netCDF file define mode.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_sh
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_momy_t
subroutine, public atmos_phy_sf_vars_restart_create
Create restart file.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_q2
logical, public io_aggregate
do parallel I/O through PnetCDF
subroutine, public fileio_open(fid, basename)
open a netCDF file for read
integer, public const_i_sw
short-wave radiation index
logical, public atmos_phy_sf_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
subroutine, public fileio_def_var(fid, vid, varname, desc, unit, axistype, datatype, timeintv, nsteps)
Define a variable to file.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0m
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_t2
subroutine, public fileio_close(fid)
Close a netCDF file.
integer, public io_fid_conf
Config file ID.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_dens
integer, public io_fid_log
Log file ID.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_gh
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mu
integer, public io_fid_nml
Log file ID (only for output namelist)
integer, public ja
of whole cells: y, local, with HALO
logical, public atmos_phy_sf_restart_output
output restart file?