12 #include "inc_openmp.h" 46 integer,
private,
parameter :: num_vars_3d = 4
47 integer,
private,
parameter :: num_vars_2d = 4
48 integer,
private,
parameter :: num_vars_2d_op = 1
50 real,
private :: ATMOS_PHY_RD_offline_diffuse_rate = 0.5_rp
52 logical,
private :: vars_2d_exist(num_vars_2d_op)
66 character(len=*),
intent(in) :: rd_type
68 character(len=H_SHORT) :: vars_3d (num_vars_3d)
69 character(len=H_SHORT) :: vars_2d (num_vars_2d)
70 character(len=H_SHORT) :: vars_2d_op(num_vars_2d_op)
72 data vars_3d /
'RFLX_LW_up',
'RFLX_LW_dn',
'RFLX_SW_up',
'RFLX_SW_dn' /
73 data vars_2d /
'SFLX_LW_up',
'SFLX_LW_dn',
'SFLX_SW_up',
'SFLX_SW_dn' /
74 data vars_2d_op /
'SFLX_SW_dn_dir' /
76 character(len=H_LONG) :: atmos_phy_rd_offline_basename =
'' 77 character(len=H_SHORT) :: atmos_phy_rd_offline_axistype =
'XYZ' 78 logical :: atmos_phy_rd_offline_enable_periodic_year = .false.
79 logical :: atmos_phy_rd_offline_enable_periodic_month = .false.
80 logical :: atmos_phy_rd_offline_enable_periodic_day = .false.
81 integer :: atmos_phy_rd_offline_step_fixed = 0
82 real(RP) :: atmos_phy_rd_offline_offset = 0.0_rp
83 real(RP) :: atmos_phy_rd_offline_defval
84 logical :: atmos_phy_rd_offline_check_coordinates = .true.
85 integer :: atmos_phy_rd_offline_step_limit = 0
87 namelist / param_atmos_phy_rd_offline / &
88 atmos_phy_rd_offline_basename, &
89 atmos_phy_rd_offline_axistype, &
90 atmos_phy_rd_offline_enable_periodic_year, &
91 atmos_phy_rd_offline_enable_periodic_month, &
92 atmos_phy_rd_offline_enable_periodic_day, &
93 atmos_phy_rd_offline_step_fixed, &
94 atmos_phy_rd_offline_offset, &
95 atmos_phy_rd_offline_defval, &
96 atmos_phy_rd_offline_check_coordinates, &
97 atmos_phy_rd_offline_step_limit, &
98 atmos_phy_rd_offline_diffuse_rate
104 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[RADIATION] / Categ[ATMOS PHYSICS] / Origin[SCALElib]' 107 if ( rd_type /=
'OFFLINE' )
then 108 write(*,*)
'xxx RD_TYPE is not OFFLINE. Check!' 113 atmos_phy_rd_offline_defval = undef
117 read(
io_fid_conf,nml=param_atmos_phy_rd_offline,iostat=ierr)
119 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 120 elseif( ierr > 0 )
then 121 write(*,*)
'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_RD_OFFLINE. Check!' 126 if ( atmos_phy_rd_offline_basename ==
'' )
then 127 write(*,*)
'xxx ATMOS_PHY_RD_offline_basename is necessary' 131 do n = 1, num_vars_3d
134 atmos_phy_rd_offline_axistype, &
135 atmos_phy_rd_offline_enable_periodic_year, &
136 atmos_phy_rd_offline_enable_periodic_month, &
137 atmos_phy_rd_offline_enable_periodic_day, &
138 atmos_phy_rd_offline_step_fixed, &
139 atmos_phy_rd_offline_offset, &
140 atmos_phy_rd_offline_defval, &
141 atmos_phy_rd_offline_check_coordinates, &
142 atmos_phy_rd_offline_step_limit )
145 do n = 1, num_vars_2d
149 atmos_phy_rd_offline_enable_periodic_year, &
150 atmos_phy_rd_offline_enable_periodic_month, &
151 atmos_phy_rd_offline_enable_periodic_day, &
152 atmos_phy_rd_offline_step_fixed, &
153 atmos_phy_rd_offline_offset, &
154 atmos_phy_rd_offline_defval, &
155 atmos_phy_rd_offline_check_coordinates, &
156 atmos_phy_rd_offline_step_limit )
159 do n = 1, num_vars_2d_op
163 atmos_phy_rd_offline_enable_periodic_year, &
164 atmos_phy_rd_offline_enable_periodic_month, &
165 atmos_phy_rd_offline_enable_periodic_day, &
166 atmos_phy_rd_offline_step_fixed, &
167 atmos_phy_rd_offline_offset, &
168 atmos_phy_rd_offline_defval, &
169 atmos_phy_rd_offline_check_coordinates, &
170 atmos_phy_rd_offline_step_limit, &
171 exist = vars_2d_exist(n) )
172 if ( vars_2d_exist(n) )
then 173 if(
io_l )
write(
io_fid_log,*)
'*** ', trim(vars_2d_op(n)),
' found.' 175 if(
io_l )
write(
io_fid_log,*)
'*** ', trim(vars_2d_op(n)),
' not found.' 190 temp_sfc, albedo_land, &
212 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
213 real(RP),
intent(in) :: rhot (
ka,
ia,
ja)
214 real(RP),
intent(in) :: qtrc (
ka,
ia,
ja,
qa)
215 real(RP),
intent(in) :: cz (
ka,
ia,
ja)
216 real(RP),
intent(in) :: fz (0:
ka,
ia,
ja)
217 real(RP),
intent(in) :: fact_ocean (
ia,
ja)
218 real(RP),
intent(in) :: fact_land (
ia,
ja)
219 real(RP),
intent(in) :: fact_urban (
ia,
ja)
220 real(RP),
intent(in) :: temp_sfc (
ia,
ja)
221 real(RP),
intent(in) :: albedo_land (
ia,
ja,2)
222 real(RP),
intent(in) :: solins (
ia,
ja)
223 real(RP),
intent(in) :: cossza (
ia,
ja)
224 real(RP),
intent(out) :: flux_rad (
ka,
ia,
ja,2,2,2)
225 real(RP),
intent(out) :: flux_rad_top(
ia,
ja,2,2,2)
226 real(RP),
intent(out) :: sflx_rad_dn (
ia,
ja,2,2)
229 real(RP) :: buffer(
ia,
ja)
230 logical :: error, error_sum
235 if(
io_l )
write(
io_fid_log,*)
'*** Atmos physics step: Radiation(offline)' 243 error_sum = ( error .OR. error_sum )
246 error_sum = ( error .OR. error_sum )
249 error_sum = ( error .OR. error_sum )
252 error_sum = ( error .OR. error_sum )
256 call extin_update( buffer(:,:),
'SFLX_LW_up',
time_nowdaysec, error )
271 call extin_update( buffer(:,:),
'SFLX_LW_dn',
time_nowdaysec, error )
286 call extin_update( buffer(:,:),
'SFLX_SW_up',
time_nowdaysec, error )
301 call extin_update( buffer(:,:),
'SFLX_SW_dn',
time_nowdaysec, error )
328 if ( vars_2d_exist(1) )
then 339 sflx_rad_dn(i,j,
i_sw,
i_diffuse) = flux_rad(
ks-1,i,j,
i_sw,
i_dn,2) - sflx_rad_dn(i,j,
i_sw,
i_direct)
351 sflx_rad_dn(i,j,
i_sw,
i_direct ) = ( 1.0_rp - atmos_phy_rd_offline_diffuse_rate ) * flux_rad(
ks-1,i,j,
i_sw,
i_dn,2)
356 if ( error_sum )
then 357 write(*,*)
'xxx Requested data is not found!' 362 flux_rad(:,:,:,:,:,1) = 0.0_rp
363 flux_rad_top(:,:,:,:,:) = 0.0_rp
integer, public is
start point of inner domain: x, local
integer, public je
end point of inner domain: y, local
subroutine, public prc_mpistop
Abort MPI.
integer, parameter, public i_direct
logical, public io_l
output log or not? (this process)
real(dp), public time_nowdaysec
second of current time [sec]
subroutine, public atmos_phy_rd_offline_setup(RD_TYPE)
Setup.
integer, parameter, public i_diffuse
integer, parameter, public i_lw
real(rp), public const_undef
integer, parameter, public i_sw
logical, public io_nml
output log or not? (for namelist, this process)
integer, public ia
of whole cells: x, local, with HALO
integer, parameter, public i_dn
integer, public ka
of whole cells: z, local, with HALO
module ATMOSPHERE / Physics Radiation
integer, public js
start point of inner domain: y, local
integer, public ks
start point of inner domain: z, local
integer, public ie
end point of inner domain: x, local
subroutine, public atmos_phy_rd_offline(DENS, RHOT, QTRC, CZ, FZ, fact_ocean, fact_land, fact_urban, temp_sfc, albedo_land, solins, cosSZA, flux_rad, flux_rad_top, SFLX_rad_dn)
Radiation main.
module ATMOSPHERE / Physics Radiation
integer, public io_fid_conf
Config file ID.
integer, public io_fid_log
Log file ID.
integer, parameter, public i_up
integer, public io_fid_nml
Log file ID (only for output namelist)
integer, public ja
of whole cells: y, local, with HALO