102 integer,
private,
parameter :: vmax = 10
103 integer,
private,
parameter :: i_sfc_temp = 1
104 integer,
private,
parameter :: i_sfc_alb_ir_dir = 2
105 integer,
private,
parameter :: i_sfc_alb_ir_dif = 3
106 integer,
private,
parameter :: i_sfc_alb_nir_dir = 4
107 integer,
private,
parameter :: i_sfc_alb_nir_dif = 5
108 integer,
private,
parameter :: i_sfc_alb_vis_dir = 6
109 integer,
private,
parameter :: i_sfc_alb_vis_dif = 7
110 integer,
private,
parameter :: i_sfc_z0m = 8
111 integer,
private,
parameter :: i_sfc_z0h = 9
112 integer,
private,
parameter :: i_sfc_z0e = 10
114 character(len=H_SHORT),
private :: var_name(vmax)
115 character(len=H_MID),
private :: var_desc(vmax)
116 character(len=H_MID),
private :: var_stdn(vmax)
117 character(len=H_SHORT),
private :: var_unit(vmax)
118 integer,
private :: var_id(vmax)
119 integer,
private :: restart_fid = -1
121 data var_name /
'SFC_TEMP', &
132 data var_desc /
'surface skin temperature', &
133 'surface albedo for IR, direct ', &
134 'surface albedo for IR, diffuse', &
135 'surface albedo for NIR, direct ', &
136 'surface albedo for NIR, diffuse', &
137 'surface albedo for VIS, direct ', &
138 'surface albedo for VIS, diffuse', &
139 'surface roughness length (momentum)', &
140 'surface roughness length (heat)', &
141 'surface roughness length (vapor)' /
143 data var_stdn /
'surface_temp', &
150 'surface_roughness_length_for_momentum_in_air', &
151 'surface_roughness_length_for_heat_in_air', &
154 data var_unit /
'K', &
165 real(RP),
private :: atmos_phy_sf_default_sfc_temp = 300.0_rp
166 real(RP),
private :: atmos_phy_sf_default_sfc_albedo_lw = 0.04_rp
167 real(RP),
private :: atmos_phy_sf_default_sfc_albedo_sw = 0.10_rp
168 real(RP),
private :: atmos_phy_sf_default_sfc_z0 = 1e-4_rp
170 real(RP),
allocatable,
target :: zero(:,:)
185 namelist / param_atmos_phy_sf_vars / &
195 atmos_phy_sf_default_sfc_temp, &
196 atmos_phy_sf_default_sfc_albedo_lw, &
197 atmos_phy_sf_default_sfc_albedo_sw, &
198 atmos_phy_sf_default_sfc_z0
205 log_info(
"ATMOS_PHY_SF_vars_setup",*)
'Setup' 271 read(
io_fid_conf,nml=param_atmos_phy_sf_vars,iostat=ierr)
273 log_info(
"ATMOS_PHY_SF_vars_setup",*)
'Not found namelist. Default used.' 274 elseif( ierr > 0 )
then 275 log_error(
"ATMOS_PHY_SF_vars_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_SF_VARS. Check!' 278 log_nml(param_atmos_phy_sf_vars)
281 log_info(
"ATMOS_PHY_SF_vars_setup",*)
'[ATMOS_PHY_SF] prognostic/diagnostic variables' 282 log_info_cont(
'(1x,A,A24,A,A48,A,A12,A)') &
283 ' |',
'VARNAME ',
'|', &
284 'DESCRIPTION ',
'[',
'UNIT ',
']' 286 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
287 'NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']' 295 log_info(
"ATMOS_PHY_SF_vars_setup",*)
'Restart input? : NO' 302 log_info(
"ATMOS_PHY_SF_vars_setup",*)
'Restart output? : NO' 309 allocate( zero(
ia,
ja) )
324 integer :: n ,idir, irgn
365 character(len=19) :: timelabel
366 character(len=H_LONG) :: basename
370 log_info(
"ATMOS_PHY_SF_vars_restart_open",*)
'Open restart file (ATMOS_PHY_SF) ' 381 log_info(
"ATMOS_PHY_SF_vars_restart_open",*)
'basename: ', trim(basename)
386 log_info(
"ATMOS_PHY_SF_vars_restart_open",*)
'restart file for ATMOS_PHY_SF is not specified.' 403 if ( restart_fid /= -1 )
then 405 log_info(
"ATMOS_PHY_SF_vars_restart_read",*)
'Read from restart file (ATMOS_PHY_SF) ' 407 call file_cartesc_read( restart_fid, var_name(i_sfc_temp),
'XY', &
409 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_ir_dir),
'XY', &
411 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_ir_dif),
'XY', &
413 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_nir_dir),
'XY', &
415 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_nir_dif),
'XY', &
417 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_vis_dir),
'XY', &
419 call file_cartesc_read( restart_fid, var_name(i_sfc_alb_vis_dif),
'XY', &
421 call file_cartesc_read( restart_fid, var_name(i_sfc_z0m),
'XY', &
423 call file_cartesc_read( restart_fid, var_name(i_sfc_z0h),
'XY', &
425 call file_cartesc_read( restart_fid, var_name(i_sfc_z0e),
'XY', &
437 log_info(
"ATMOS_PHY_SF_vars_restart_read",*)
'invalid restart file ID for ATMOS_PHY_SF.' 452 character(len=19) :: timelabel
453 character(len=H_LONG) :: basename
459 log_info(
"ATMOS_PHY_SF_vars_restart_create",*)
'Create restart file (ATMOS_PHY_AE) ' 468 log_info(
"ATMOS_PHY_SF_vars_restart_create",*)
'basename: ', trim(basename)
486 if ( restart_fid /= -1 )
then 501 if ( restart_fid /= -1 )
then 503 log_info(
"ATMOS_PHY_SF_vars_restart_close",*)
'Close restart file (ATMOS_PHY_SF) ' 523 if ( restart_fid /= -1 )
then 525 do i = i_sfc_temp, i_sfc_z0e
527 var_name(i), var_desc(i), var_unit(i), &
530 standard_name=var_stdn(i) )
542 file_cartesc_write_var
546 if ( restart_fid /= -1 )
then 552 call file_cartesc_write_var( restart_fid, var_id(i_sfc_temp), &
554 var_name(i_sfc_temp),
'XY' )
555 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_ir_dir), &
557 var_name(i_sfc_alb_ir_dir),
'XY' )
558 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_ir_dif), &
560 var_name(i_sfc_alb_ir_dif),
'XY' )
561 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_nir_dir), &
563 var_name(i_sfc_alb_nir_dir),
'XY' )
564 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_nir_dif), &
566 var_name(i_sfc_alb_nir_dif),
'XY' )
567 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_vis_dir), &
569 var_name(i_sfc_alb_vis_dir),
'XY' )
570 call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_vis_dif), &
572 var_name(i_sfc_alb_vis_dif),
'XY' )
573 call file_cartesc_write_var( restart_fid, var_id(i_sfc_z0m), &
575 var_name(i_sfc_z0m),
'XY' )
576 call file_cartesc_write_var( restart_fid, var_id(i_sfc_z0h), &
578 var_name(i_sfc_z0h),
'XY' )
579 call file_cartesc_write_var( restart_fid, var_id(i_sfc_z0e), &
581 var_name(i_sfc_z0e),
'XY' )
602 var_name(i_sfc_temp), &
607 var_name(i_sfc_alb_ir_dir), &
612 var_name(i_sfc_alb_ir_dif), &
617 var_name(i_sfc_alb_nir_dir), &
622 var_name(i_sfc_alb_nir_dif), &
627 var_name(i_sfc_alb_vis_dir), &
632 var_name(i_sfc_alb_vis_dif), &
637 var_name(i_sfc_z0m), &
642 var_name(i_sfc_z0h), &
647 var_name(i_sfc_z0e), &
subroutine, public atmos_phy_sf_vars_restart_def_var
Write restart.
logical, public atmos_phy_sf_restart_out_aggregate
Switch to use aggregate file.
subroutine atmos_phy_sf_vars_checktotal
subroutine, public atmos_phy_sf_vars_restart_open
Open restart file for read.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhou_t
subroutine, public atmos_phy_sf_vars_restart_read
Read restart.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhot_t
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0e
character(len=h_long), public atmos_phy_sf_restart_out_basename
Basename of the output file.
module coupler / surface-atmospehre
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhoh
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mw
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_momz_t
logical, public atmos_phy_sf_restart_in_aggregate
Switch to use aggregate file.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_v10
integer, public ia
of whole cells: x, local, with HALO
integer, parameter, public i_r_vis
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_temp
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_sf_sflx_mv
subroutine, public atmos_phy_sf_vars_restart_enddef
Exit netCDF define mode.
logical, public statistics_checktotal
calc&report variable totals to logfile?
subroutine, public atmos_phy_sf_vars_setup
Setup.
real(rp), public const_undef
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_l_mo
integer, public is
start point of inner domain: x, local
real(rp), dimension(:,:,:), allocatable, public atmos_phy_sf_rhoq_t
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.
integer, public ie
end point of inner domain: x, local
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_sf_sfc_albedo
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_u10
module atmosphere / hydrometeor
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
module atmosphere / grid / cartesC index
integer, public je
end point of inner domain: y, local
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.
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
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
real(rp), dimension(:,:,:), allocatable, target, public atmos_phy_sf_sflx_qtrc
logical, public atmos_phy_sf_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
subroutine, public prc_abort
Abort Process.
real(rp), dimension(:,:), pointer, public atmos_phy_sf_sflx_qv
integer, public js
start point of inner domain: y, local
integer, parameter, public i_r_direct
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.
logical function, public file_get_aggregate(fid)
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_sh
subroutine, public atmos_phy_sf_vars_restart_create
Create restart file.
integer, parameter, public i_r_nir
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_q2
module Atmosphere GRID CartesC Real(real space)
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
logical, public atmos_phy_sf_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhov_t
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0m
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_t2
integer, parameter, public i_r_ir
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_dens_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_phy_sf_sfc_dens
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_gh
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mu
subroutine, public file_cartesc_open(basename, fid, aggregate)
open a netCDF file for read
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
real(rp), public atmos_grid_cartesc_real_totarea
total area (xy, local) [m2]
logical, public atmos_phy_sf_restart_output
output restart file?