11#include "scaleFElib.h"
64 integer :: tends_num_tot
68 procedure :: init => atmosphyrdvars_init
69 procedure :: final => atmosphyrdvars_final
70 procedure :: setup => atmosphyrdvars_setup
71 procedure :: history => atmosphyrdvars_history
72 procedure :: read_restart_file => atmosphyrdvars_read_restart_file
73 procedure :: write_restart_file_prep => atmosphyrdvars_write_restart_file_prep
74 procedure :: write_restart_file => atmosphyrdvars_write_restart_file
75 procedure :: write_restart_file_post => atmosphyrdvars_write_restart_file_post
88 'J/kg/s', 3,
'XYZ',
'' ) /
133 subroutine atmosphyrdvars_init( this, model_mesh )
135 use scale_tracer,
only: &
136 tracer_name, tracer_desc, tracer_unit
137 use scale_file_history,
only: &
142 class(modelmeshbase),
target,
intent(in) :: model_mesh
151 logical :: reg_file_hist
154 log_info(
'AtmosPhyRdVars_Init',*)
156 end subroutine atmosphyrdvars_init
159 subroutine atmosphyrdvars_setup( this, model_mesh )
160 use scale_tracer,
only: &
161 tracer_name, tracer_desc, tracer_unit
162 use scale_file_history,
only: &
167 class(modelmeshbase),
target,
intent(in) :: model_mesh
176 logical :: reg_file_hist
179 log_info(
'AtmosPhyRdVars_Init',*)
186 select type(model_mesh)
188 atm_mesh => model_mesh
190 mesh3d => atm_mesh%ptr_mesh
192 call mesh3d%GetMesh2D( mesh2d )
197 call this%tends_manager%Init()
198 allocate( this%tends(this%TENDS_NUM_TOT) )
200 reg_file_hist = .true.
202 call this%tends_manager%Regist( &
204 this%tends(iv), reg_file_hist )
206 do n = 1, mesh3d%LOCAL_MESH_NUM
207 this%tends(iv)%local(n)%val(:,:) = 0.0_rp
212 call this%auxvars2D_manager%Init()
215 reg_file_hist = .true.
217 call this%auxvars2D_manager%Regist( &
219 this%auxvars2D(iv), reg_file_hist )
221 do n = 1, mesh2d%LOCAL_MESH_NUM
222 this%auxvars2D(iv)%local(n)%val(:,:) = 0.0_rp
227 call atm_mesh%Setup_restartfile( this%restart_file, &
231 end subroutine atmosphyrdvars_setup
235 subroutine atmosphyrdvars_final( this )
240 log_info(
'AtmosPhyRdVars_Final',*)
242 call this%tends_manager%Final()
243 deallocate( this%tends )
245 call this%auxvars2D_manager%Final()
246 deallocate( this%auxvars2D )
249 end subroutine atmosphyrdvars_final
253 subroutine atmosphyrdvars_history( this )
262 do v = 1, this%TENDS_NUM_TOT
263 hst_id = this%tends(v)%hist_id
268 hst_id = this%auxvars2D(v)%hist_id
273 end subroutine atmosphyrdvars_history
278 subroutine atmosphyrdvars_read_restart_file( this )
288 log_info(
"AtmosPhyRdVars_Read_restart_file",*)
'Open restart file (ATMOS/Physics radiation) '
291 call this%restart_file%Open()
296 call this%restart_file%Read_var( dimtype_xy, this%auxvars2D(iv)%varname, &
301 log_info(
"AtmosPhyRdVars_Read_restart_file",*)
'Close restart file (ATMOS/Physics radiation) '
302 call this%restart_file%Close()
304 end subroutine atmosphyrdvars_read_restart_file
309 subroutine atmosphyrdvars_write_restart_file_prep( this )
313 integer :: iv, rf_vid
317 log_info(
"AtmosPhyRdVars_Write_restart_file_prep",*)
'Define variables with ATMOS/Physics radiation'
320 call this%restart_file%Create()
321 call prc_mpibarrier()
327 call this%restart_file%Def_var( this%auxvars2D(iv), &
331 end subroutine atmosphyrdvars_write_restart_file_prep
336 subroutine atmosphyrdvars_write_restart_file( this )
340 integer :: iv, rf_vid
345 call this%restart_file%Write_var(rf_vid, this%auxvars2D(iv) )
348 end subroutine atmosphyrdvars_write_restart_file
353 subroutine atmosphyrdvars_write_restart_file_post( this )
357 log_info(
"AtmosPhyRdVars_Write_restart_file_post",*)
'Close restart file (ATMOS/Physics radiation) '
359 call this%restart_file%Close()
361 end subroutine atmosphyrdvars_write_restart_file_post
module Atmosphere / Physics / Radiation
integer, parameter, public atmos_phy_rd_aux2d_solins_id
ID of solar insolation flux at the top of the model.
integer, parameter, public atmos_phy_rd_aux2d_tomflx_lw_up_id
ID of upward longwave flux at the top of the model.
integer, parameter, public atmos_phy_rd_aux2d_tomflx_sw_dn_id
ID of downward shortwave flux at the top of the model.
integer, parameter, public atmos_phy_rd_restart_var_num
Number of restart variables for radiation component.
type(variableinfo), dimension(atmos_phy_rd_aux2d_num), public atmos_phy_rd_aux2d_vinfo
integer, parameter, public atmos_phy_rd_aux2d_cossza_id
ID of cosine of solar zenith angle.
integer, parameter, public atmos_phy_rd_sflx_dn_lw
ID of downward longwave flux at the surface.
integer, parameter, public atmos_phy_rd_sflx_dn_num
Number of downward radiative fluxes.
integer, parameter, public atmos_phy_rd_tends_num1
integer, parameter, public atmos_phy_rd_aux2d_tomflx_sw_up_id
ID of upward shortwave flux at the top of the model.
type(variableinfo), dimension(atmos_phy_rd_tends_num1), public atmos_phy_rd_tend_vinfo
integer, parameter, public atmos_phy_rd_aux2d_sflx_sw_dn_id
ID of downward shortwave surface flux.
integer, parameter, public atmos_phy_rd_rhoh_id
ID of diabatic heating rate in RD process.
integer, parameter, public atmos_phy_rd_aux2d_sflx_lw_dn_id
ID of downward longwave surface flux.
integer, parameter, public atmos_phy_rd_aux2d_tomflx_lw_dn_id
ID of downward longwave flux at the top of the model.
integer, parameter, public atmos_phy_rd_aux2d_sflx_sw_up_id
ID of upward shortwave surface flux.
integer, parameter, public atmos_phy_rd_aux2d_sflx_lw_up_id
ID of upward longwave surface flux.
integer, parameter, public atmos_phy_rd_sflx_dn_sw_dir
ID of downward direct shortwave flux at the surface.
integer, parameter, public atmos_phy_rd_sflx_dn_sw_dif
ID of downward diffuse shortwave flux at the surface.
integer, parameter, public atmos_phy_rd_aux2d_num
module FElib / Element / Base
module FElib / File / History
module FElib / File / Restart
type(file_restart_meshfield), public restart_file
An object to manage main restart file.
module FElib / Mesh / Local 3D
module FElib / Mesh / Local, Base
module FElib / Data / base
module FElib / Mesh / Base 2D
module FElib / Mesh / Base 3D
integer, public meshbase3d_dimtypeid_xy
integer, public meshbase3d_dimtypeid_xyz
module FElib / Mesh / Base
module FElib / Data / base
module FElib / Data / Communication base
FElib / model framework / mesh manager.
FElib / model framework / variable manager.
Derived type to manage a computational mesh (base class)
Derived type to manage variables with radiation component in atmospheric model.
Derived type representing a 3D reference element.
Derived type to manage restart file with each component.
Derived type to manage a local 3D computational domain.
Derived type to manage a local computational domain (base type)
Derived type representing a field with local mesh (base type)
Derived type to manage a computational mesh (base type for 2D domain)
Derived type to manage a computational mesh (base type for 3D domain)
Base type to manage a computational mesh.
Derived type representing a field with 2D mesh.
Derived type representing a field with 3D mesh.
Derived type representing a field (base type)
Container to save a pointer of MeshField(1D, 2D, 3D) object.