SCALE-RM
Functions/Subroutines | Variables
mod_atmos_phy_rd_vars Module Reference

module Atmosphere / Physics Radiation More...

Functions/Subroutines

subroutine, public atmos_phy_rd_vars_setup
 Setup. More...
 
subroutine, public atmos_phy_rd_vars_finalize
 Finalize. More...
 
subroutine, public atmos_phy_rd_vars_fillhalo
 HALO Communication. More...
 
subroutine, public atmos_phy_rd_vars_restart_open
 Open restart file for read. More...
 
subroutine, public atmos_phy_rd_vars_restart_read
 Read restart. More...
 
subroutine, public atmos_phy_rd_vars_restart_create
 Create restart file. More...
 
subroutine, public atmos_phy_rd_vars_restart_enddef
 Exit netCDF define mode. More...
 
subroutine, public atmos_phy_rd_vars_restart_close
 Close restart file. More...
 
subroutine, public atmos_phy_rd_vars_restart_def_var
 Define variables in restart file. More...
 
subroutine, public atmos_phy_rd_vars_restart_write
 Write variables to restart file. More...
 
subroutine atmos_phy_rd_vars_check
 

Variables

logical, public atmos_phy_rd_restart_output = .false.
 output restart file? More...
 
character(len=h_long), public atmos_phy_rd_restart_in_basename = ''
 Basename of the input file. More...
 
logical, public atmos_phy_rd_restart_in_aggregate
 Switch to use aggregate file. More...
 
logical, public atmos_phy_rd_restart_in_postfix_timelabel = .false.
 Add timelabel to the basename of input file? More...
 
character(len=h_long), public atmos_phy_rd_restart_out_basename = ''
 Basename of the output file. More...
 
logical, public atmos_phy_rd_restart_out_aggregate
 Switch to use aggregate file. More...
 
logical, public atmos_phy_rd_restart_out_postfix_timelabel = .true.
 Add timelabel to the basename of output file? More...
 
character(len=h_mid), public atmos_phy_rd_restart_out_title = 'ATMOS_PHY_RD restart'
 title of the output file More...
 
character(len=h_short), public atmos_phy_rd_restart_out_dtype = 'DEFAULT'
 REAL4 or REAL8. More...
 
real(rp), dimension(:,:,:), allocatable, public atmos_phy_rd_rhoh
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_dn
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_up
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_dn
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_lw_up
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_lw_dn
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_sw_up
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_sw_dn
 
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_down
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_solins
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_cossza
 

Detailed Description

module Atmosphere / Physics Radiation

Description
Container for mod_atmos_phy_rd
Author
Team SCALE
NAMELIST
  • PARAM_ATMOS_PHY_RD_VARS
    nametypedefault valuecomment
    ATMOS_PHY_RD_RESTART_IN_BASENAME character(len=H_LONG) '' Basename of the input file
    ATMOS_PHY_RD_RESTART_IN_AGGREGATE logical Switch to use aggregate file
    ATMOS_PHY_RD_RESTART_IN_POSTFIX_TIMELABEL logical .false. Add timelabel to the basename of input file?
    ATMOS_PHY_RD_RESTART_OUTPUT logical .false. output restart file?
    ATMOS_PHY_RD_RESTART_OUT_BASENAME character(len=H_LONG) '' Basename of the output file
    ATMOS_PHY_RD_RESTART_OUT_AGGREGATE logical Switch to use aggregate file
    ATMOS_PHY_RD_RESTART_OUT_POSTFIX_TIMELABEL logical .true. Add timelabel to the basename of output file?
    ATMOS_PHY_RD_RESTART_OUT_TITLE character(len=H_MID) 'ATMOS_PHY_RD restart' title of the output file
    ATMOS_PHY_RD_RESTART_OUT_DTYPE character(len=H_SHORT) 'DEFAULT' REAL4 or REAL8

History Output
No history output

Function/Subroutine Documentation

◆ atmos_phy_rd_vars_setup()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_setup

Setup.

Definition at line 122 of file mod_atmos_phy_rd_vars.F90.

122  use scale_prc, only: &
123  prc_abort
124  use scale_const, only: &
125  undef => const_undef
126  implicit none
127 
128  namelist / param_atmos_phy_rd_vars / &
129  atmos_phy_rd_restart_in_basename, &
130  atmos_phy_rd_restart_in_aggregate, &
131  atmos_phy_rd_restart_in_postfix_timelabel, &
132  atmos_phy_rd_restart_output, &
133  atmos_phy_rd_restart_out_basename, &
134  atmos_phy_rd_restart_out_aggregate, &
135  atmos_phy_rd_restart_out_postfix_timelabel, &
136  atmos_phy_rd_restart_out_title, &
137  atmos_phy_rd_restart_out_dtype
138 
139  integer :: ierr
140  integer :: iv
141  !---------------------------------------------------------------------------
142 
143  log_newline
144  log_info("ATMOS_PHY_RD_vars_setup",*) 'Setup'
145 
146  allocate( atmos_phy_rd_rhoh(ka,ia,ja) )
147  atmos_phy_rd_rhoh(:,:,:) = undef
148  !$acc enter data create(ATMOS_PHY_RD_RHOH)
149 
150  allocate( atmos_phy_rd_sflx_lw_up(ia,ja) )
151  allocate( atmos_phy_rd_sflx_lw_dn(ia,ja) )
152  allocate( atmos_phy_rd_sflx_sw_up(ia,ja) )
153  allocate( atmos_phy_rd_sflx_sw_dn(ia,ja) )
154  atmos_phy_rd_sflx_lw_up(:,:) = undef
155  atmos_phy_rd_sflx_lw_dn(:,:) = undef
156  atmos_phy_rd_sflx_sw_up(:,:) = undef
157  atmos_phy_rd_sflx_sw_dn(:,:) = undef
158  !$acc enter data create(ATMOS_PHY_RD_SFLX_LW_up,ATMOS_PHY_RD_SFLX_LW_dn,ATMOS_PHY_RD_SFLX_SW_up,ATMOS_PHY_RD_SFLX_SW_dn)
159 
160  allocate( atmos_phy_rd_tomflx_lw_up(ia,ja) )
161  allocate( atmos_phy_rd_tomflx_lw_dn(ia,ja) )
162  allocate( atmos_phy_rd_tomflx_sw_up(ia,ja) )
163  allocate( atmos_phy_rd_tomflx_sw_dn(ia,ja) )
164  atmos_phy_rd_tomflx_lw_up(:,:) = undef
165  atmos_phy_rd_tomflx_lw_dn(:,:) = undef
166  atmos_phy_rd_tomflx_sw_up(:,:) = undef
167  atmos_phy_rd_tomflx_sw_dn(:,:) = undef
168  !$acc enter data create(ATMOS_PHY_RD_TOMFLX_LW_up,ATMOS_PHY_RD_TOMFLX_LW_dn,ATMOS_PHY_RD_TOMFLX_SW_up,ATMOS_PHY_RD_TOMFLX_SW_dn)
169 
170  allocate( atmos_phy_rd_sflx_down(ia,ja,n_rad_dir,n_rad_rgn) )
171  atmos_phy_rd_sflx_down(:,:,:,:) = undef
172  !$acc enter data create(ATMOS_PHY_RD_SFLX_down)
173 
174  allocate( atmos_phy_rd_solins(ia,ja) )
175  allocate( atmos_phy_rd_cossza(ia,ja) )
176  atmos_phy_rd_solins(:,:) = undef
177  atmos_phy_rd_cossza(:,:) = undef
178  !$acc enter data create(ATMOS_PHY_RD_solins,ATMOS_PHY_RD_cosSZA)
179 
180  !--- read namelist
181  rewind(io_fid_conf)
182  read(io_fid_conf,nml=param_atmos_phy_rd_vars,iostat=ierr)
183  if( ierr < 0 ) then !--- missing
184  log_info("ATMOS_PHY_RD_vars_setup",*) 'Not found namelist. Default used.'
185  elseif( ierr > 0 ) then !--- fatal error
186  log_error("ATMOS_PHY_RD_vars_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_PHY_RD_VARS. Check!'
187  call prc_abort
188  endif
189  log_nml(param_atmos_phy_rd_vars)
190 
191  log_newline
192  log_info("ATMOS_PHY_RD_vars_setup",*) '[ATMOS_PHY_RD] prognostic/diagnostic variables'
193  log_info_cont('(1x,A,A24,A,A48,A,A12,A)') &
194  ' |', 'VARNAME ','|', &
195  'DESCRIPTION ', '[', 'UNIT ', ']'
196  do iv = 1, vmax
197  log_info_cont('(1x,A,I3,A,A24,A,A48,A,A12,A)') &
198  'NO.',iv,'|',var_name(iv),'|',var_desc(iv),'[',var_unit(iv),']'
199  enddo
200 
201  log_newline
202  if ( atmos_phy_rd_restart_in_basename /= '' ) then
203  log_info("ATMOS_PHY_RD_vars_setup",*) 'Restart input? : YES, file = ', trim(atmos_phy_rd_restart_in_basename)
204  log_info("ATMOS_PHY_RD_vars_setup",*) 'Add timelabel? : ', atmos_phy_rd_restart_in_postfix_timelabel
205  else
206  log_info("ATMOS_PHY_RD_vars_setup",*) 'Restart input? : NO'
207  endif
208  if ( atmos_phy_rd_restart_output &
209  .AND. atmos_phy_rd_restart_out_basename /= '' ) then
210  log_info("ATMOS_PHY_RD_vars_setup",*) 'Restart output? : YES, file = ', trim(atmos_phy_rd_restart_out_basename)
211  log_info("ATMOS_PHY_RD_vars_setup",*) 'Add timelabel? : ', atmos_phy_rd_restart_out_postfix_timelabel
212  else
213  log_info("ATMOS_PHY_RD_vars_setup",*) 'Restart output? : NO'
214  atmos_phy_rd_restart_output = .false.
215  endif
216 
217  return

References atmos_phy_rd_cossza, atmos_phy_rd_restart_in_aggregate, atmos_phy_rd_restart_in_basename, atmos_phy_rd_restart_in_postfix_timelabel, atmos_phy_rd_restart_out_aggregate, atmos_phy_rd_restart_out_basename, atmos_phy_rd_restart_out_dtype, atmos_phy_rd_restart_out_postfix_timelabel, atmos_phy_rd_restart_out_title, atmos_phy_rd_restart_output, atmos_phy_rd_rhoh, atmos_phy_rd_sflx_down, atmos_phy_rd_sflx_lw_dn, atmos_phy_rd_sflx_lw_up, atmos_phy_rd_sflx_sw_dn, atmos_phy_rd_sflx_sw_up, atmos_phy_rd_solins, atmos_phy_rd_tomflx_lw_dn, atmos_phy_rd_tomflx_lw_up, atmos_phy_rd_tomflx_sw_dn, atmos_phy_rd_tomflx_sw_up, scale_const::const_undef, scale_atmos_grid_cartesc_index::ia, scale_io::io_fid_conf, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::ka, scale_cpl_sfc_index::n_rad_dir, scale_cpl_sfc_index::n_rad_rgn, and scale_prc::prc_abort().

Referenced by mod_atmos_vars::atmos_vars_setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_vars_finalize()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_finalize

Finalize.

Definition at line 223 of file mod_atmos_phy_rd_vars.F90.

223  implicit none
224  !---------------------------------------------------------------------------
225 
226  log_newline
227  log_info("ATMOS_PHY_RD_vars_finalize",*) 'Finalize'
228 
229  !$acc exit data delete(ATMOS_PHY_RD_RHOH)
230  deallocate( atmos_phy_rd_rhoh )
231 
232  !$acc exit data delete(ATMOS_PHY_RD_SFLX_LW_up,ATMOS_PHY_RD_SFLX_LW_dn,ATMOS_PHY_RD_SFLX_SW_up,ATMOS_PHY_RD_SFLX_SW_dn)
233  deallocate( atmos_phy_rd_sflx_lw_up )
234  deallocate( atmos_phy_rd_sflx_lw_dn )
235  deallocate( atmos_phy_rd_sflx_sw_up )
236  deallocate( atmos_phy_rd_sflx_sw_dn )
237 
238  !$acc exit data delete(ATMOS_PHY_RD_TOMFLX_LW_up,ATMOS_PHY_RD_TOMFLX_LW_dn,ATMOS_PHY_RD_TOMFLX_SW_up,ATMOS_PHY_RD_TOMFLX_SW_dn)
239  deallocate( atmos_phy_rd_tomflx_lw_up )
240  deallocate( atmos_phy_rd_tomflx_lw_dn )
241  deallocate( atmos_phy_rd_tomflx_sw_up )
242  deallocate( atmos_phy_rd_tomflx_sw_dn )
243 
244  !$acc exit data delete(ATMOS_PHY_RD_SFLX_down)
245  deallocate( atmos_phy_rd_sflx_down )
246 
247  !$acc exit data delete(ATMOS_PHY_RD_solins,ATMOS_PHY_RD_cosSZA)
248  deallocate( atmos_phy_rd_solins )
249  deallocate( atmos_phy_rd_cossza )
250 
251  return

References atmos_phy_rd_cossza, atmos_phy_rd_rhoh, atmos_phy_rd_sflx_down, atmos_phy_rd_sflx_lw_dn, atmos_phy_rd_sflx_lw_up, atmos_phy_rd_sflx_sw_dn, atmos_phy_rd_sflx_sw_up, atmos_phy_rd_solins, atmos_phy_rd_tomflx_lw_dn, atmos_phy_rd_tomflx_lw_up, atmos_phy_rd_tomflx_sw_dn, and atmos_phy_rd_tomflx_sw_up.

Referenced by mod_atmos_vars::atmos_vars_finalize().

Here is the caller graph for this function:

◆ atmos_phy_rd_vars_fillhalo()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_fillhalo

HALO Communication.

Definition at line 257 of file mod_atmos_phy_rd_vars.F90.

257  use scale_comm_cartesc, only: &
258  comm_vars8, &
259  comm_wait
260  implicit none
261 
262  integer :: n ,idir, irgn
263  !---------------------------------------------------------------------------
264 
265  call comm_vars8( atmos_phy_rd_sflx_lw_up(:,:), 1 )
266  call comm_vars8( atmos_phy_rd_sflx_lw_dn(:,:), 2 )
267  call comm_vars8( atmos_phy_rd_sflx_sw_up(:,:), 3 )
268  call comm_vars8( atmos_phy_rd_sflx_sw_dn(:,:), 4 )
269  call comm_vars8( atmos_phy_rd_tomflx_lw_up(:,:), 5 )
270  call comm_vars8( atmos_phy_rd_tomflx_lw_dn(:,:), 6 )
271  call comm_vars8( atmos_phy_rd_tomflx_sw_up(:,:), 7 )
272  call comm_vars8( atmos_phy_rd_tomflx_sw_dn(:,:), 8 )
273 
274  n = 8
275  do irgn = i_r_ir, i_r_vis
276  do idir = i_r_direct, i_r_diffuse
277  n = n + 1
278  call comm_vars8( atmos_phy_rd_sflx_down(:,:,idir,irgn), n )
279  enddo
280  enddo
281 
282  call comm_wait ( atmos_phy_rd_sflx_lw_up(:,:), 1 )
283  call comm_wait ( atmos_phy_rd_sflx_lw_dn(:,:), 2 )
284  call comm_wait ( atmos_phy_rd_sflx_sw_up(:,:), 3 )
285  call comm_wait ( atmos_phy_rd_sflx_sw_dn(:,:), 4 )
286  call comm_wait ( atmos_phy_rd_tomflx_lw_up(:,:), 5 )
287  call comm_wait ( atmos_phy_rd_tomflx_lw_dn(:,:), 6 )
288  call comm_wait ( atmos_phy_rd_tomflx_sw_up(:,:), 7 )
289  call comm_wait ( atmos_phy_rd_tomflx_sw_dn(:,:), 8 )
290 
291  n = 8
292  do irgn = i_r_ir, i_r_vis
293  do idir = i_r_direct, i_r_diffuse
294  n = n + 1
295  call comm_wait ( atmos_phy_rd_sflx_down(:,:,idir,irgn), n )
296  enddo
297  enddo
298 
299  return

References atmos_phy_rd_sflx_down, atmos_phy_rd_sflx_lw_dn, atmos_phy_rd_sflx_lw_up, atmos_phy_rd_sflx_sw_dn, atmos_phy_rd_sflx_sw_up, atmos_phy_rd_tomflx_lw_dn, atmos_phy_rd_tomflx_lw_up, atmos_phy_rd_tomflx_sw_dn, atmos_phy_rd_tomflx_sw_up, scale_cpl_sfc_index::i_r_diffuse, scale_cpl_sfc_index::i_r_direct, scale_cpl_sfc_index::i_r_ir, and scale_cpl_sfc_index::i_r_vis.

Referenced by atmos_phy_rd_vars_restart_read(), and atmos_phy_rd_vars_restart_write().

Here is the caller graph for this function:

◆ atmos_phy_rd_vars_restart_open()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_open

Open restart file for read.

Definition at line 305 of file mod_atmos_phy_rd_vars.F90.

305  use scale_time, only: &
307  use scale_file_cartesc, only: &
309  implicit none
310 
311  character(len=19) :: timelabel
312  character(len=H_LONG) :: basename
313  !---------------------------------------------------------------------------
314 
315  log_newline
316  log_info("ATMOS_PHY_RD_vars_restart_open",*) 'Open restart file (ATMOS_PHY_RD) '
317 
318  if ( atmos_phy_rd_restart_in_basename /= '' ) then
319 
320  if ( atmos_phy_rd_restart_in_postfix_timelabel ) then
321  call time_gettimelabel( timelabel )
322  basename = trim(atmos_phy_rd_restart_in_basename)//'_'//trim(timelabel)
323  else
324  basename = trim(atmos_phy_rd_restart_in_basename)
325  endif
326 
327  log_info("ATMOS_PHY_RD_vars_restart_open",*) 'basename: ', trim(basename)
328 
329  call file_cartesc_open( basename, restart_fid, aggregate=atmos_phy_rd_restart_in_aggregate )
330  else
331  log_info("ATMOS_PHY_RD_vars_restart_open",*) 'restart file for ATMOS_PHY_RD is not specified.'
332  endif
333 
334  return

References atmos_phy_rd_restart_in_aggregate, atmos_phy_rd_restart_in_basename, atmos_phy_rd_restart_in_postfix_timelabel, scale_file_cartesc::file_cartesc_open(), and scale_time::time_gettimelabel().

Referenced by mod_atmos_vars::atmos_vars_restart_open().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_vars_restart_read()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_read

Read restart.

Definition at line 340 of file mod_atmos_phy_rd_vars.F90.

340  use scale_file, only: &
342  use scale_file_cartesc, only: &
343  file_cartesc_read, &
345  implicit none
346  !---------------------------------------------------------------------------
347 
348  if ( restart_fid /= -1 ) then
349  log_newline
350  log_info("ATMOS_PHY_RD_vars_restart_read",*) 'Read from restart file (ATMOS_PHY_RD) '
351 
352  call file_cartesc_read( restart_fid, var_name(i_sflx_lw_up), 'XY', & ! [IN]
353  atmos_phy_rd_sflx_lw_up(:,:) ) ! [OUT]
354  call file_cartesc_read( restart_fid, var_name(i_sflx_lw_dn), 'XY', & ! [IN]
355  atmos_phy_rd_sflx_lw_dn(:,:) ) ! [OUT]
356  call file_cartesc_read( restart_fid, var_name(i_sflx_sw_up), 'XY', & ! [IN]
357  atmos_phy_rd_sflx_sw_up(:,:) ) ! [OUT]
358  call file_cartesc_read( restart_fid, var_name(i_sflx_sw_dn), 'XY', & ! [IN]
359  atmos_phy_rd_sflx_sw_dn(:,:) ) ! [OUT]
360 
361  if ( file_get_aggregate(restart_fid) ) then
362  call file_cartesc_flush( restart_fid ) ! X/Y halos have been read from file
363  !$acc update device(ATMOS_PHY_RD_SFLX_LW_up,ATMOS_PHY_RD_SFLX_LW_dn,ATMOS_PHY_RD_SFLX_SW_up,ATMOS_PHY_RD_SFLX_SW_dn)
364  else
365  call atmos_phy_rd_vars_fillhalo
366  end if
367 
368  call atmos_phy_rd_vars_check
369 
370  else
371  log_info("ATMOS_PHY_RD_vars_restart_read",*) 'invalid restart file ID for ATMOS_PHY_RD.'
372  endif
373 
374  return

References atmos_phy_rd_sflx_lw_dn, atmos_phy_rd_sflx_lw_up, atmos_phy_rd_sflx_sw_dn, atmos_phy_rd_sflx_sw_up, atmos_phy_rd_vars_check(), atmos_phy_rd_vars_fillhalo(), scale_file_cartesc::file_cartesc_flush(), and scale_file::file_get_aggregate().

Referenced by mod_atmos_vars::atmos_vars_restart_read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_vars_restart_create()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_create

Create restart file.

Definition at line 380 of file mod_atmos_phy_rd_vars.F90.

380  use scale_time, only: &
382  use scale_file_cartesc, only: &
384  implicit none
385 
386  character(len=19) :: timelabel
387  character(len=H_LONG) :: basename
388  !---------------------------------------------------------------------------
389 
390  if ( atmos_phy_rd_restart_out_basename /= '' ) then
391 
392  log_newline
393  log_info("ATMOS_PHY_RD_vars_restart_create",*) 'Create restart file (ATMOS_PHY_AE) '
394 
395  if ( atmos_phy_rd_restart_out_postfix_timelabel ) then
396  call time_gettimelabel( timelabel )
397  basename = trim(atmos_phy_rd_restart_out_basename)//'_'//trim(timelabel)
398  else
399  basename = trim(atmos_phy_rd_restart_out_basename)
400  endif
401 
402  log_info("ATMOS_PHY_RD_vars_restart_create",*) 'basename: ', trim(basename)
403 
404  call file_cartesc_create( &
405  basename, atmos_phy_rd_restart_out_title, atmos_phy_rd_restart_out_dtype, & ! [IN]
406  restart_fid, & ! [OUT]
407  aggregate=atmos_phy_rd_restart_out_aggregate ) ! [IN]
408 
409  endif
410 
411  return

References atmos_phy_rd_restart_out_aggregate, atmos_phy_rd_restart_out_basename, atmos_phy_rd_restart_out_dtype, atmos_phy_rd_restart_out_postfix_timelabel, atmos_phy_rd_restart_out_title, scale_file_cartesc::file_cartesc_create(), and scale_time::time_gettimelabel().

Referenced by mod_atmos_vars::atmos_vars_restart_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_vars_restart_enddef()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_enddef

Exit netCDF define mode.

Definition at line 417 of file mod_atmos_phy_rd_vars.F90.

417  use scale_file_cartesc, only: &
419  implicit none
420 
421  if ( restart_fid /= -1 ) then
422  call file_cartesc_enddef( restart_fid ) ! [IN]
423  endif
424 
425  return

References scale_file_cartesc::file_cartesc_enddef().

Referenced by mod_atmos_vars::atmos_vars_restart_enddef().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_vars_restart_close()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_close

Close restart file.

Definition at line 431 of file mod_atmos_phy_rd_vars.F90.

431  use scale_file_cartesc, only: &
433  implicit none
434  !---------------------------------------------------------------------------
435 
436  if ( restart_fid /= -1 ) then
437  log_newline
438  log_info("ATMOS_PHY_RD_vars_restart_close",*) 'Close restart file (ATMOS_PHY_RD) '
439 
440  call file_cartesc_close( restart_fid ) ! [IN]
441 
442  restart_fid = -1
443  endif
444 
445  return

References scale_file_cartesc::file_cartesc_close().

Referenced by mod_atmos_vars::atmos_vars_restart_close().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_vars_restart_def_var()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_def_var

Define variables in restart file.

Definition at line 451 of file mod_atmos_phy_rd_vars.F90.

451  use scale_file_cartesc, only: &
453  implicit none
454 
455  integer :: i
456  !---------------------------------------------------------------------------
457 
458  if ( restart_fid /= -1 ) then
459 
460  do i = 1, vmax
461  call file_cartesc_def_var( restart_fid, & ! [IN]
462  var_name(i), var_desc(i), var_unit(i), & ! [IN]
463  'XY', atmos_phy_rd_restart_out_dtype, & ! [IN]
464  var_id(i), & ! [OUT]
465  standard_name=var_stdn(i) ) ! [IN]
466  end do
467  endif
468 
469  return

References atmos_phy_rd_restart_out_dtype, and scale_file_cartesc::file_cartesc_def_var().

Referenced by mod_atmos_vars::atmos_vars_restart_def_var().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_vars_restart_write()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_restart_write

Write variables to restart file.

Definition at line 475 of file mod_atmos_phy_rd_vars.F90.

475  use scale_file_cartesc, only: &
476  file_cartesc_write_var
477  implicit none
478  !---------------------------------------------------------------------------
479 
480  if ( restart_fid /= -1 ) then
481 
482  call atmos_phy_rd_vars_fillhalo
483 
484  call atmos_phy_rd_vars_check
485 
486  call file_cartesc_write_var( restart_fid, var_id(i_sflx_lw_up), & ! [IN]
487  atmos_phy_rd_sflx_lw_up(:,:), & ! [IN]
488  var_name(i_sflx_lw_up), 'XY' ) ! [IN]
489  call file_cartesc_write_var( restart_fid, var_id(i_sflx_lw_dn), & ! [IN]
490  atmos_phy_rd_sflx_lw_dn(:,:), & ! [IN]
491  var_name(i_sflx_lw_dn), 'XY' ) ! [IN]
492  call file_cartesc_write_var( restart_fid, var_id(i_sflx_sw_up), & ! [IN]
493  atmos_phy_rd_sflx_sw_up(:,:), & ! [IN]
494  var_name(i_sflx_sw_up), 'XY' ) ! [IN]
495  call file_cartesc_write_var( restart_fid, var_id(i_sflx_sw_dn), & ! [IN]
496  atmos_phy_rd_sflx_sw_dn(:,:), & ! [IN]
497  var_name(i_sflx_sw_dn), 'XY' ) ! [IN]
498 
499  endif
500 
501  return

References atmos_phy_rd_sflx_lw_dn, atmos_phy_rd_sflx_lw_up, atmos_phy_rd_sflx_sw_dn, atmos_phy_rd_sflx_sw_up, atmos_phy_rd_vars_check(), and atmos_phy_rd_vars_fillhalo().

Referenced by mod_atmos_vars::atmos_vars_restart_write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_vars_check()

subroutine mod_atmos_phy_rd_vars::atmos_phy_rd_vars_check

Definition at line 506 of file mod_atmos_phy_rd_vars.F90.

506  use scale_statistics, only: &
507  statistics_total
508  use scale_atmos_grid_cartesc_real, only: &
511  implicit none
512  !---------------------------------------------------------------------------
513 
514  call valcheck( ia, is, ie, ja, js, je, &
515  atmos_phy_rd_sflx_lw_up(:,:), & ! (in)
516  0.0_rp, 1.0e4_rp, var_name(i_sflx_lw_up), & ! (in)
517  __file__, __line__ ) ! (in)
518  call valcheck( ia, is, ie, ja, js, je, &
519  atmos_phy_rd_sflx_lw_dn(:,:), & ! (in)
520  0.0_rp, 1.0e4_rp, var_name(i_sflx_lw_dn), & ! (in)
521  __file__, __line__ ) ! (in)
522  call valcheck( ia, is, ie, ja, js, je, &
523  atmos_phy_rd_sflx_sw_up(:,:), & ! (in)
524  0.0_rp, 1.0e4_rp, var_name(i_sflx_sw_up), & ! (in)
525  __file__, __line__ ) ! (in)
526  call valcheck( ia, is, ie, ja, js, je, &
527  atmos_phy_rd_sflx_sw_dn(:,:), & ! (in)
528  0.0_rp, 1.0e4_rp, var_name(i_sflx_sw_dn), & ! (in)
529  __file__, __line__ ) ! (in)
530 
531  call statistics_total( ia, is, ie, ja, js, je, & ! [IN]
532  atmos_phy_rd_sflx_lw_up(:,:), & ! [IN]
533  var_name(i_sflx_lw_up), & ! [IN]
534  atmos_grid_cartesc_real_area(:,:), & ! [IN]
536  call statistics_total( ia, is, ie, ja, js, je, & ! [IN]
537  atmos_phy_rd_sflx_lw_dn(:,:), & ! [IN]
538  var_name(i_sflx_lw_dn), & ! [IN]
539  atmos_grid_cartesc_real_area(:,:), & ! [IN]
541  call statistics_total( ia, is, ie, ja, js, je, & ! [IN]
542  atmos_phy_rd_sflx_sw_up(:,:), & ! [IN]
543  var_name(i_sflx_sw_up), & ! [IN]
544  atmos_grid_cartesc_real_area(:,:), & ! [IN]
546  call statistics_total( ia, is, ie, ja, js, je, & ! [IN]
547  atmos_phy_rd_sflx_sw_dn(:,:), & ! [IN]
548  var_name(i_sflx_sw_dn), & ! [IN]
549  atmos_grid_cartesc_real_area(:,:), & ! [IN]
551 
552  return

References scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_area, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totarea, atmos_phy_rd_sflx_lw_dn, atmos_phy_rd_sflx_lw_up, atmos_phy_rd_sflx_sw_dn, atmos_phy_rd_sflx_sw_up, scale_atmos_grid_cartesc_index::ia, scale_atmos_grid_cartesc_index::ie, scale_atmos_grid_cartesc_index::is, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::je, and scale_atmos_grid_cartesc_index::js.

Referenced by atmos_phy_rd_vars_restart_read(), and atmos_phy_rd_vars_restart_write().

Here is the caller graph for this function:

Variable Documentation

◆ atmos_phy_rd_restart_output

logical, public mod_atmos_phy_rd_vars::atmos_phy_rd_restart_output = .false.

output restart file?

Definition at line 47 of file mod_atmos_phy_rd_vars.F90.

47  logical, public :: ATMOS_PHY_RD_RESTART_OUTPUT = .false.

Referenced by mod_admin_restart::admin_restart_setup(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_restart_in_basename

character(len=h_long), public mod_atmos_phy_rd_vars::atmos_phy_rd_restart_in_basename = ''

Basename of the input file.

Definition at line 49 of file mod_atmos_phy_rd_vars.F90.

49  character(len=H_LONG), public :: ATMOS_PHY_RD_RESTART_IN_BASENAME = ''

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_rd_vars_restart_open(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_restart_in_aggregate

logical, public mod_atmos_phy_rd_vars::atmos_phy_rd_restart_in_aggregate

Switch to use aggregate file.

Definition at line 50 of file mod_atmos_phy_rd_vars.F90.

50  logical, public :: ATMOS_PHY_RD_RESTART_IN_AGGREGATE

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_rd_vars_restart_open(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_restart_in_postfix_timelabel

logical, public mod_atmos_phy_rd_vars::atmos_phy_rd_restart_in_postfix_timelabel = .false.

Add timelabel to the basename of input file?

Definition at line 51 of file mod_atmos_phy_rd_vars.F90.

51  logical, public :: ATMOS_PHY_RD_RESTART_IN_POSTFIX_TIMELABEL = .false.

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_rd_vars_restart_open(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_restart_out_basename

character(len=h_long), public mod_atmos_phy_rd_vars::atmos_phy_rd_restart_out_basename = ''

Basename of the output file.

Definition at line 52 of file mod_atmos_phy_rd_vars.F90.

52  character(len=H_LONG), public :: ATMOS_PHY_RD_RESTART_OUT_BASENAME = ''

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_rd_vars_restart_create(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_restart_out_aggregate

logical, public mod_atmos_phy_rd_vars::atmos_phy_rd_restart_out_aggregate

Switch to use aggregate file.

Definition at line 53 of file mod_atmos_phy_rd_vars.F90.

53  logical, public :: ATMOS_PHY_RD_RESTART_OUT_AGGREGATE

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_rd_vars_restart_create(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_restart_out_postfix_timelabel

logical, public mod_atmos_phy_rd_vars::atmos_phy_rd_restart_out_postfix_timelabel = .true.

Add timelabel to the basename of output file?

Definition at line 54 of file mod_atmos_phy_rd_vars.F90.

54  logical, public :: ATMOS_PHY_RD_RESTART_OUT_POSTFIX_TIMELABEL = .true.

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_rd_vars_restart_create(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_restart_out_title

character(len=h_mid), public mod_atmos_phy_rd_vars::atmos_phy_rd_restart_out_title = 'ATMOS_PHY_RD restart'

title of the output file

Definition at line 55 of file mod_atmos_phy_rd_vars.F90.

55  character(len=H_MID), public :: ATMOS_PHY_RD_RESTART_OUT_TITLE = 'ATMOS_PHY_RD restart'

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_rd_vars_restart_create(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_restart_out_dtype

character(len=h_short), public mod_atmos_phy_rd_vars::atmos_phy_rd_restart_out_dtype = 'DEFAULT'

REAL4 or REAL8.

Definition at line 56 of file mod_atmos_phy_rd_vars.F90.

56  character(len=H_SHORT), public :: ATMOS_PHY_RD_RESTART_OUT_DTYPE = 'DEFAULT'

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_rd_vars_restart_create(), atmos_phy_rd_vars_restart_def_var(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_rhoh

real(rp), dimension(:,:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_rhoh

Definition at line 58 of file mod_atmos_phy_rd_vars.F90.

58  real(RP), public, allocatable :: ATMOS_PHY_RD_RHOH(:,:,:) ! diavatic heating rate [J/m3/s]

Referenced by mod_atmos_phy_rd_driver::atmos_phy_rd_driver_calc_tendency(), atmos_phy_rd_vars_finalize(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_sflx_lw_up

real(rp), dimension (:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_lw_up

◆ atmos_phy_rd_sflx_lw_dn

real(rp), dimension (:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_lw_dn

◆ atmos_phy_rd_sflx_sw_up

real(rp), dimension (:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_sw_up

◆ atmos_phy_rd_sflx_sw_dn

real(rp), dimension (:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_sw_dn

◆ atmos_phy_rd_tomflx_lw_up

real(rp), dimension(:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_lw_up

◆ atmos_phy_rd_tomflx_lw_dn

real(rp), dimension(:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_lw_dn

◆ atmos_phy_rd_tomflx_sw_up

real(rp), dimension(:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_sw_up

◆ atmos_phy_rd_tomflx_sw_dn

real(rp), dimension(:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_sw_dn

◆ atmos_phy_rd_sflx_down

real(rp), dimension (:,:,:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_down

Definition at line 72 of file mod_atmos_phy_rd_vars.F90.

72  real(RP), public, allocatable :: ATMOS_PHY_RD_SFLX_down (:,:,:,:) ! surface downward flux (LW/SW,direct/diffuse) [J/m2/s]

Referenced by mod_atmos_phy_rd_driver::atmos_phy_rd_driver_calc_tendency(), mod_atmos_phy_rd_driver::atmos_phy_rd_driver_setup(), atmos_phy_rd_vars_fillhalo(), atmos_phy_rd_vars_finalize(), atmos_phy_rd_vars_setup(), and mod_atmos_driver::atmos_surface_set().

◆ atmos_phy_rd_solins

real(rp), dimension (:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_solins

Definition at line 74 of file mod_atmos_phy_rd_vars.F90.

74  real(RP), public, allocatable :: ATMOS_PHY_RD_solins (:,:) ! solar insolation flux [J/m2/s]

Referenced by mod_atmos_phy_rd_driver::atmos_phy_rd_driver_calc_tendency(), mod_atmos_phy_rd_driver::atmos_phy_rd_driver_setup(), atmos_phy_rd_vars_finalize(), and atmos_phy_rd_vars_setup().

◆ atmos_phy_rd_cossza

real(rp), dimension (:,:), allocatable, public mod_atmos_phy_rd_vars::atmos_phy_rd_cossza

Definition at line 75 of file mod_atmos_phy_rd_vars.F90.

75  real(RP), public, allocatable :: ATMOS_PHY_RD_cosSZA (:,:) ! cos(solar zenith angle) (0-1)

Referenced by mod_atmos_phy_rd_driver::atmos_phy_rd_driver_calc_tendency(), mod_atmos_phy_rd_driver::atmos_phy_rd_driver_setup(), atmos_phy_rd_vars_finalize(), atmos_phy_rd_vars_setup(), and mod_atmos_driver::atmos_surface_set().

mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_down
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_down
Definition: mod_atmos_phy_rd_vars.F90:72
scale_statistics
module Statistics
Definition: scale_statistics.F90:11
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
mod_atmos_phy_rd_vars::atmos_phy_rd_rhoh
real(rp), dimension(:,:,:), allocatable, public atmos_phy_rd_rhoh
Definition: mod_atmos_phy_rd_vars.F90:58
scale_file_cartesc::file_cartesc_enddef
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
Definition: scale_file_cartesC.F90:964
scale_file_cartesc::file_cartesc_def_var
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.
Definition: scale_file_cartesC.F90:3360
mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_lw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_lw_dn
Definition: mod_atmos_phy_rd_vars.F90:68
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totarea
real(rp), public atmos_grid_cartesc_real_totarea
total area (xy, local) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:78
mod_atmos_phy_rd_vars::atmos_phy_rd_cossza
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_cossza
Definition: mod_atmos_phy_rd_vars.F90:75
mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_sw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_sw_up
Definition: mod_atmos_phy_rd_vars.F90:69
scale_atmos_grid_cartesc_real
module Atmosphere GRID CartesC Real(real space)
Definition: scale_atmos_grid_cartesC_real.F90:11
scale_file
module file
Definition: scale_file.F90:15
scale_prc
module PROCESS
Definition: scale_prc.F90:11
mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_lw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_dn
Definition: mod_atmos_phy_rd_vars.F90:62
mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_dn
Definition: mod_atmos_phy_rd_vars.F90:64
scale_const
module CONSTANT
Definition: scale_const.F90:11
mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_sw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_up
Definition: mod_atmos_phy_rd_vars.F90:63
mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_lw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
Definition: mod_atmos_phy_rd_vars.F90:61
scale_file_cartesc::file_cartesc_close
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
Definition: scale_file_cartesC.F90:1044
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_area
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:66
mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_sw_dn
Definition: mod_atmos_phy_rd_vars.F90:70
scale_time
module TIME
Definition: scale_time.F90:11
mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_lw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_lw_up
Definition: mod_atmos_phy_rd_vars.F90:67
scale_file_cartesc::file_cartesc_create
subroutine, public file_cartesc_create(basename, title, datatype, fid, date, subsec, haszcoord, append, aggregate, single)
Create/open a netCDF file.
Definition: scale_file_cartesC.F90:796
scale_file_cartesc::file_cartesc_flush
subroutine, public file_cartesc_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
Definition: scale_file_cartesC.F90:1018
scale_time::time_gettimelabel
subroutine, public time_gettimelabel(timelabel)
generate time label
Definition: scale_time.F90:93
scale_comm_cartesc
module COMMUNICATION
Definition: scale_comm_cartesC.F90:11
scale_file::file_get_aggregate
logical function, public file_get_aggregate(fid)
Definition: scale_file.F90:6316
scale_file_cartesc::file_cartesc_open
subroutine, public file_cartesc_open(basename, fid, single, aggregate)
open a netCDF file for read
Definition: scale_file_cartesC.F90:760
mod_atmos_phy_rd_vars::atmos_phy_rd_solins
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_solins
Definition: mod_atmos_phy_rd_vars.F90:74
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:43
scale_file_cartesc
module file / cartesianC
Definition: scale_file_cartesC.F90:11