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_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_external_in (init_value_in)
 Input from External I/O. 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...
 

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_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_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_rhot_t
 
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_toaflx_lw_up
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_dn
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_up
 
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_dn
 
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_downall
 
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
History
  • 2014-05-04 (H.Yashiro) [new]
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_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_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 143 of file mod_atmos_phy_rd_vars.f90.

References atmos_phy_rd_cossza, atmos_phy_rd_restart_in_basename, atmos_phy_rd_restart_in_postfix_timelabel, 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_rhot_t, atmos_phy_rd_sflx_downall, 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_toaflx_lw_dn, atmos_phy_rd_toaflx_lw_up, atmos_phy_rd_toaflx_sw_dn, atmos_phy_rd_toaflx_sw_up, scale_const::const_undef, scale_grid_index::ia, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::ja, scale_grid_index::ka, and scale_process::prc_mpistop().

Referenced by mod_atmos_vars::atmos_vars_setup().

143  use scale_process, only: &
145  use scale_const, only: &
146  undef => const_undef
147  implicit none
148 
149  namelist / param_atmos_phy_rd_vars / &
150  atmos_phy_rd_restart_in_basename, &
151  atmos_phy_rd_restart_in_postfix_timelabel, &
152  atmos_phy_rd_restart_output, &
153  atmos_phy_rd_restart_out_basename, &
154  atmos_phy_rd_restart_out_postfix_timelabel, &
155  atmos_phy_rd_restart_out_title, &
156  atmos_phy_rd_restart_out_dtype
157 
158  integer :: ierr
159  integer :: iv
160  !---------------------------------------------------------------------------
161 
162  if( io_l ) write(io_fid_log,*)
163  if( io_l ) write(io_fid_log,*) '++++++ Module[VARS] / Categ[ATMOS PHY_RD] / Origin[SCALE-RM]'
164 
165  allocate( atmos_phy_rd_rhot_t(ka,ia,ja) )
166  atmos_phy_rd_rhot_t(:,:,:) = undef
167 
168  allocate( atmos_phy_rd_sflx_lw_up(ia,ja) )
169  allocate( atmos_phy_rd_sflx_lw_dn(ia,ja) )
170  allocate( atmos_phy_rd_sflx_sw_up(ia,ja) )
171  allocate( atmos_phy_rd_sflx_sw_dn(ia,ja) )
172  allocate( atmos_phy_rd_toaflx_lw_up(ia,ja) )
173  allocate( atmos_phy_rd_toaflx_lw_dn(ia,ja) )
174  allocate( atmos_phy_rd_toaflx_sw_up(ia,ja) )
175  allocate( atmos_phy_rd_toaflx_sw_dn(ia,ja) )
176  atmos_phy_rd_sflx_lw_up(:,:) = undef
177  atmos_phy_rd_sflx_lw_dn(:,:) = undef
178  atmos_phy_rd_sflx_sw_up(:,:) = undef
179  atmos_phy_rd_sflx_sw_dn(:,:) = undef
180  atmos_phy_rd_toaflx_lw_up(:,:) = undef
181  atmos_phy_rd_toaflx_lw_dn(:,:) = undef
182  atmos_phy_rd_toaflx_sw_up(:,:) = undef
183  atmos_phy_rd_toaflx_sw_dn(:,:) = undef
184 
185  allocate( atmos_phy_rd_sflx_downall(ia,ja,2,2) )
186  atmos_phy_rd_sflx_downall(:,:,:,:) = undef
187 
188  allocate( atmos_phy_rd_solins(ia,ja) )
189  allocate( atmos_phy_rd_cossza(ia,ja) )
190  atmos_phy_rd_solins(:,:) = undef
191  atmos_phy_rd_cossza(:,:) = undef
192 
193  !--- read namelist
194  rewind(io_fid_conf)
195  read(io_fid_conf,nml=param_atmos_phy_rd_vars,iostat=ierr)
196  if( ierr < 0 ) then !--- missing
197  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
198  elseif( ierr > 0 ) then !--- fatal error
199  write(*,*) 'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_RD_VARS. Check!'
200  call prc_mpistop
201  endif
202  if( io_nml ) write(io_fid_nml,nml=param_atmos_phy_rd_vars)
203 
204  if( io_l ) write(io_fid_log,*)
205  if( io_l ) write(io_fid_log,*) '*** [ATMOS_PHY_RD] prognostic/diagnostic variables'
206  if( io_l ) write(io_fid_log,'(1x,A,A24,A,A48,A,A12,A)') &
207  '*** |', 'VARNAME ','|', &
208  'DESCRIPTION ', '[', 'UNIT ', ']'
209  do iv = 1, vmax
210  if( io_l ) write(io_fid_log,'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
211  '*** NO.',iv,'|',var_name(iv),'|',var_desc(iv),'[',var_unit(iv),']'
212  enddo
213 
214  if( io_l ) write(io_fid_log,*)
215  if ( atmos_phy_rd_restart_in_basename /= '' ) then
216  if( io_l ) write(io_fid_log,*) '*** Restart input? : YES, file = ', trim(atmos_phy_rd_restart_in_basename)
217  if( io_l ) write(io_fid_log,*) '*** Add timelabel? : ', atmos_phy_rd_restart_in_postfix_timelabel
218  else
219  if( io_l ) write(io_fid_log,*) '*** Restart input? : NO'
220  endif
221  if ( atmos_phy_rd_restart_output &
222  .AND. atmos_phy_rd_restart_out_basename /= '' ) then
223  if( io_l ) write(io_fid_log,*) '*** Restart output? : YES, file = ', trim(atmos_phy_rd_restart_out_basename)
224  if( io_l ) write(io_fid_log,*) '*** Add timelabel? : ', atmos_phy_rd_restart_out_postfix_timelabel
225  else
226  if( io_l ) write(io_fid_log,*) '*** Restart output? : NO'
227  atmos_phy_rd_restart_output = .false.
228  endif
229 
230  return
subroutine, public prc_mpistop
Abort MPI.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_rd_rhot_t
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_up
real(rp), public const_undef
Definition: scale_const.F90:43
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_cossza
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_toaflx_lw_dn
module PROCESS
module CONSTANT
Definition: scale_const.F90:14
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_downall
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_solins
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_up
Here is the call graph for this function:
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 236 of file mod_atmos_phy_rd_vars.f90.

References atmos_phy_rd_sflx_downall, 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_toaflx_lw_dn, atmos_phy_rd_toaflx_lw_up, atmos_phy_rd_toaflx_sw_dn, and atmos_phy_rd_toaflx_sw_up.

Referenced by atmos_phy_rd_vars_restart_read(), and atmos_phy_rd_vars_restart_write().

236  use scale_comm, only: &
237  comm_vars8, &
238  comm_wait
239  implicit none
240 
241  integer :: n ,iw, id
242  !---------------------------------------------------------------------------
243 
244  call comm_vars8( atmos_phy_rd_sflx_lw_up(:,:), 1 )
245  call comm_vars8( atmos_phy_rd_sflx_lw_dn(:,:), 2 )
246  call comm_vars8( atmos_phy_rd_sflx_sw_up(:,:), 3 )
247  call comm_vars8( atmos_phy_rd_sflx_sw_dn(:,:), 4 )
248  call comm_vars8( atmos_phy_rd_toaflx_lw_up(:,:), 5 )
249  call comm_vars8( atmos_phy_rd_toaflx_lw_dn(:,:), 6 )
250  call comm_vars8( atmos_phy_rd_toaflx_sw_up(:,:), 7 )
251  call comm_vars8( atmos_phy_rd_toaflx_sw_dn(:,:), 8 )
252 
253  n = 8
254  do id = 1, 2 ! direct/diffuse
255  do iw = 1, 2 ! SW/LW
256  n = n + 1
257  call comm_vars8( atmos_phy_rd_sflx_downall(:,:,iw,id), n )
258  enddo
259  enddo
260 
261  call comm_wait ( atmos_phy_rd_sflx_lw_up(:,:), 1 )
262  call comm_wait ( atmos_phy_rd_sflx_lw_dn(:,:), 2 )
263  call comm_wait ( atmos_phy_rd_sflx_sw_up(:,:), 3 )
264  call comm_wait ( atmos_phy_rd_sflx_sw_dn(:,:), 4 )
265  call comm_wait ( atmos_phy_rd_toaflx_lw_up(:,:), 5 )
266  call comm_wait ( atmos_phy_rd_toaflx_lw_dn(:,:), 6 )
267  call comm_wait ( atmos_phy_rd_toaflx_sw_up(:,:), 7 )
268  call comm_wait ( atmos_phy_rd_toaflx_sw_dn(:,:), 8 )
269 
270  n = 8
271  do id = 1, 2 ! direct/diffuse
272  do iw = 1, 2 ! SW/LW
273  n = n + 1
274  call comm_wait ( atmos_phy_rd_sflx_downall(:,:,iw,id), n )
275  enddo
276  enddo
277 
278  return
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_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
module COMMUNICATION
Definition: scale_comm.F90:23
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_dn
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_downall
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_up
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 284 of file mod_atmos_phy_rd_vars.f90.

References atmos_phy_rd_restart_in_basename, atmos_phy_rd_restart_in_postfix_timelabel, scale_fileio::fileio_open(), scale_stdio::io_fid_log, scale_stdio::io_l, and scale_time::time_gettimelabel().

Referenced by mod_atmos_vars::atmos_vars_restart_open().

284  use scale_time, only: &
286  use scale_fileio, only: &
288  implicit none
289 
290  character(len=19) :: timelabel
291  character(len=H_LONG) :: basename
292  !---------------------------------------------------------------------------
293 
294  if( io_l ) write(io_fid_log,*)
295  if( io_l ) write(io_fid_log,*) '*** Open restart file (ATMOS_PHY_RD) ***'
296 
297  if ( atmos_phy_rd_restart_in_basename /= '' ) then
298 
299  if ( atmos_phy_rd_restart_in_postfix_timelabel ) then
300  call time_gettimelabel( timelabel )
301  basename = trim(atmos_phy_rd_restart_in_basename)//'_'//trim(timelabel)
302  else
303  basename = trim(atmos_phy_rd_restart_in_basename)
304  endif
305 
306  if( io_l ) write(io_fid_log,*) '*** basename: ', trim(basename)
307 
308  call fileio_open( restart_fid, basename )
309  else
310  if( io_l ) write(io_fid_log,*) '*** restart file for ATMOS_PHY_RD is not specified.'
311  endif
312 
313  return
module FILE I/O (netcdf)
subroutine, public time_gettimelabel(timelabel)
generate time label
Definition: scale_time.F90:90
module TIME
Definition: scale_time.F90:15
subroutine, public fileio_open(fid, basename)
open a netCDF file for read
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 320 of file mod_atmos_phy_rd_vars.f90.

References atmos_phy_rd_sflx_downall, 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_toaflx_lw_dn, atmos_phy_rd_toaflx_lw_up, atmos_phy_rd_toaflx_sw_dn, atmos_phy_rd_toaflx_sw_up, atmos_phy_rd_vars_fillhalo(), scale_fileio::fileio_flush(), scale_stdio::io_aggregate, scale_stdio::io_fid_log, scale_stdio::io_l, and scale_rm_statistics::statistics_checktotal.

Referenced by mod_atmos_vars::atmos_vars_restart_read().

320  use scale_rm_statistics, only: &
322  stat_total
323  use scale_fileio, only: &
324  fileio_read, &
326  implicit none
327 
328  real(RP) :: total
329  !---------------------------------------------------------------------------
330 
331  if ( restart_fid /= -1 ) then
332  if( io_l ) write(io_fid_log,*)
333  if( io_l ) write(io_fid_log,*) '*** Read from restart file (ATMOS_PHY_RD) ***'
334 
335  call fileio_read( atmos_phy_rd_sflx_lw_up(:,:), & ! [OUT]
336  restart_fid, var_name(1) , 'XY', step=1 ) ! [IN]
337  call fileio_read( atmos_phy_rd_sflx_lw_dn(:,:), & ! [OUT]
338  restart_fid, var_name(2) , 'XY', step=1 ) ! [IN]
339  call fileio_read( atmos_phy_rd_sflx_sw_up(:,:), & ! [OUT]
340  restart_fid, var_name(3) , 'XY', step=1 ) ! [IN]
341  call fileio_read( atmos_phy_rd_sflx_sw_dn(:,:), & ! [OUT]
342  restart_fid, var_name(4) , 'XY', step=1 ) ! [IN]
343  call fileio_read( atmos_phy_rd_toaflx_lw_up(:,:), & ! [OUT]
344  restart_fid, var_name(5) , 'XY', step=1 ) ! [IN]
345  call fileio_read( atmos_phy_rd_toaflx_lw_dn(:,:), & ! [OUT]
346  restart_fid, var_name(6) , 'XY', step=1 ) ! [IN]
347  call fileio_read( atmos_phy_rd_toaflx_sw_up(:,:), & ! [OUT]
348  restart_fid, var_name(7) , 'XY', step=1 ) ! [IN]
349  call fileio_read( atmos_phy_rd_toaflx_sw_dn(:,:), & ! [OUT]
350  restart_fid, var_name(8) , 'XY', step=1 ) ! [IN]
351  call fileio_read( atmos_phy_rd_sflx_downall(:,:,1,1), & ! [OUT]
352  restart_fid, var_name(9) , 'XY', step=1 ) ! [IN]
353  call fileio_read( atmos_phy_rd_sflx_downall(:,:,1,2), & ! [OUT]
354  restart_fid, var_name(10), 'XY', step=1 ) ! [IN]
355  call fileio_read( atmos_phy_rd_sflx_downall(:,:,2,1), & ! [OUT]
356  restart_fid, var_name(11), 'XY', step=1 ) ! [IN]
357  call fileio_read( atmos_phy_rd_sflx_downall(:,:,2,2), & ! [OUT]
358  restart_fid, var_name(12), 'XY', step=1 ) ! [IN]
359 
360  if ( io_aggregate ) then
361  call fileio_flush( restart_fid ) ! X/Y halos have been read from file
362  else
363  call atmos_phy_rd_vars_fillhalo
364  end if
365 
366  if ( statistics_checktotal ) then
367  call stat_total( total, atmos_phy_rd_sflx_lw_up(:,:), var_name(1) )
368  call stat_total( total, atmos_phy_rd_sflx_lw_dn(:,:), var_name(2) )
369  call stat_total( total, atmos_phy_rd_sflx_sw_up(:,:), var_name(3) )
370  call stat_total( total, atmos_phy_rd_sflx_sw_dn(:,:), var_name(4) )
371  call stat_total( total, atmos_phy_rd_toaflx_lw_up(:,:), var_name(5) )
372  call stat_total( total, atmos_phy_rd_toaflx_lw_dn(:,:), var_name(6) )
373  call stat_total( total, atmos_phy_rd_toaflx_sw_up(:,:), var_name(7) )
374  call stat_total( total, atmos_phy_rd_toaflx_sw_dn(:,:), var_name(8) )
375  call stat_total( total, atmos_phy_rd_sflx_downall(:,:,1,1), var_name(9) )
376  call stat_total( total, atmos_phy_rd_sflx_downall(:,:,1,2), var_name(10) )
377  call stat_total( total, atmos_phy_rd_sflx_downall(:,:,2,1), var_name(11) )
378  call stat_total( total, atmos_phy_rd_sflx_downall(:,:,2,2), var_name(12) )
379  end if
380  else
381  if( io_l ) write(io_fid_log,*) '*** invalid restart file ID for ATMOS_PHY_RD.'
382  endif
383 
384  return
logical, public statistics_checktotal
calc&report variable totals to logfile?
subroutine, public fileio_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
module FILE I/O (netcdf)
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_up
module Statistics
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_toaflx_lw_dn
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_downall
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_up
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_vars_external_in()

subroutine, public mod_atmos_phy_rd_vars::atmos_phy_rd_vars_external_in ( real(rp), intent(in)  init_value_in)

Input from External I/O.

Definition at line 391 of file mod_atmos_phy_rd_vars.f90.

References atmos_phy_rd_sflx_downall, 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_toaflx_lw_dn, atmos_phy_rd_toaflx_lw_up, atmos_phy_rd_toaflx_sw_dn, atmos_phy_rd_toaflx_sw_up, scale_stdio::io_fid_log, and scale_stdio::io_l.

391  implicit none
392 
393  real(RP), intent(in) :: init_value_in
394  !---------------------------------------------------------------------------
395 
396  if( io_l ) write(io_fid_log,*)
397  if( io_l ) write(io_fid_log,*) '*** External Input (PHY_RD) ***'
398 
399  atmos_phy_rd_sflx_lw_up(:,:) = init_value_in
400  atmos_phy_rd_sflx_lw_dn(:,:) = init_value_in
401  atmos_phy_rd_sflx_sw_up(:,:) = init_value_in
402  atmos_phy_rd_sflx_sw_dn(:,:) = init_value_in
403  atmos_phy_rd_toaflx_lw_up(:,:) = init_value_in
404  atmos_phy_rd_toaflx_lw_dn(:,:) = init_value_in
405  atmos_phy_rd_toaflx_sw_up(:,:) = init_value_in
406  atmos_phy_rd_toaflx_sw_dn(:,:) = init_value_in
407  atmos_phy_rd_sflx_downall(:,:,:,:) = init_value_in
408 
409  return
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_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_toaflx_lw_dn
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_downall
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_up

◆ 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 415 of file mod_atmos_phy_rd_vars.f90.

References 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_fileio::fileio_create(), scale_stdio::io_fid_log, scale_stdio::io_l, and scale_time::time_gettimelabel().

Referenced by mod_atmos_vars::atmos_vars_restart_create().

415  use scale_time, only: &
417  use scale_fileio, only: &
419  implicit none
420 
421  character(len=19) :: timelabel
422  character(len=H_LONG) :: basename
423  !---------------------------------------------------------------------------
424 
425  if ( atmos_phy_rd_restart_out_basename /= '' ) then
426 
427  if( io_l ) write(io_fid_log,*)
428  if( io_l ) write(io_fid_log,*) '*** Create restart file (ATMOS_PHY_AE) ***'
429 
430  if ( atmos_phy_rd_restart_out_postfix_timelabel ) then
431  call time_gettimelabel( timelabel )
432  basename = trim(atmos_phy_rd_restart_out_basename)//'_'//trim(timelabel)
433  else
434  basename = trim(atmos_phy_rd_restart_out_basename)
435  endif
436 
437  if( io_l ) write(io_fid_log,*) '*** basename: ', trim(basename)
438 
439  call fileio_create( restart_fid, & ! [OUT]
440  basename, atmos_phy_rd_restart_out_title, atmos_phy_rd_restart_out_dtype ) ! [IN]
441 
442  endif
443 
444  return
module FILE I/O (netcdf)
subroutine, public time_gettimelabel(timelabel)
generate time label
Definition: scale_time.F90:90
subroutine, public fileio_create(fid, basename, title, datatype, date, subsec, append, nozcoord)
Create/open a netCDF file.
module TIME
Definition: scale_time.F90:15
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 450 of file mod_atmos_phy_rd_vars.f90.

References scale_fileio::fileio_enddef().

Referenced by mod_atmos_vars::atmos_vars_restart_enddef().

450  use scale_fileio, only: &
452  implicit none
453 
454  if ( restart_fid /= -1 ) then
455  call fileio_enddef( restart_fid ) ! [IN]
456  endif
457 
458  return
module FILE I/O (netcdf)
subroutine, public fileio_enddef(fid)
Exit netCDF file define mode.
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 464 of file mod_atmos_phy_rd_vars.f90.

References scale_fileio::fileio_close(), scale_stdio::io_fid_log, and scale_stdio::io_l.

Referenced by mod_atmos_vars::atmos_vars_restart_close().

464  use scale_fileio, only: &
466  implicit none
467  !---------------------------------------------------------------------------
468 
469  if ( restart_fid /= -1 ) then
470  if( io_l ) write(io_fid_log,*)
471  if( io_l ) write(io_fid_log,*) '*** Close restart file (ATMOS_PHY_RD) ***'
472 
473  call fileio_close( restart_fid ) ! [IN]
474 
475  restart_fid = -1
476  endif
477 
478  return
module FILE I/O (netcdf)
subroutine, public fileio_close(fid)
Close a netCDF file.
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 484 of file mod_atmos_phy_rd_vars.f90.

References atmos_phy_rd_restart_out_dtype, and scale_fileio::fileio_def_var().

Referenced by mod_atmos_vars::atmos_vars_restart_def_var().

484  use scale_fileio, only: &
486  implicit none
487  !---------------------------------------------------------------------------
488 
489  if ( restart_fid /= -1 ) then
490 
491  call fileio_def_var( restart_fid, var_id(1), var_name(1) , var_desc(1) , var_unit(1) , &
492  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
493  call fileio_def_var( restart_fid, var_id(2), var_name(2) , var_desc(2) , var_unit(2) , &
494  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
495  call fileio_def_var( restart_fid, var_id(3), var_name(3) , var_desc(3) , var_unit(3) , &
496  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
497  call fileio_def_var( restart_fid, var_id(4), var_name(4) , var_desc(4) , var_unit(4) , &
498  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
499  call fileio_def_var( restart_fid, var_id(5), var_name(5) , var_desc(5) , var_unit(5) , &
500  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
501  call fileio_def_var( restart_fid, var_id(6), var_name(6) , var_desc(6) , var_unit(6) , &
502  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
503  call fileio_def_var( restart_fid, var_id(7), var_name(7) , var_desc(7) , var_unit(7) , &
504  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
505  call fileio_def_var( restart_fid, var_id(8), var_name(8) , var_desc(8) , var_unit(8) , &
506  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
507  call fileio_def_var( restart_fid, var_id(9), var_name(9) , var_desc(9) , var_unit(9) , &
508  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
509  call fileio_def_var( restart_fid, var_id(10), var_name(10), var_desc(10), var_unit(10), &
510  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
511  call fileio_def_var( restart_fid, var_id(11), var_name(11), var_desc(11), var_unit(11), &
512  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
513  call fileio_def_var( restart_fid, var_id(12), var_name(12), var_desc(12), var_unit(12), &
514  'XY', atmos_phy_rd_restart_out_dtype ) ! [IN]
515 
516  endif
517 
518  return
module FILE I/O (netcdf)
subroutine, public fileio_def_var(fid, vid, varname, desc, unit, axistype, datatype, timeintv, nsteps)
Define a variable to file.
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 524 of file mod_atmos_phy_rd_vars.f90.

References atmos_phy_rd_sflx_downall, 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_toaflx_lw_dn, atmos_phy_rd_toaflx_lw_up, atmos_phy_rd_toaflx_sw_dn, atmos_phy_rd_toaflx_sw_up, atmos_phy_rd_vars_fillhalo(), and scale_rm_statistics::statistics_checktotal.

Referenced by mod_atmos_vars::atmos_vars_restart_write().

524  use scale_rm_statistics, only: &
526  stat_total
527  use scale_fileio, only: &
528  fileio_write_var
529  implicit none
530 
531  real(RP) :: total
532  !---------------------------------------------------------------------------
533 
534  if ( restart_fid /= -1 ) then
535 
536  call atmos_phy_rd_vars_fillhalo
537 
538  if ( statistics_checktotal ) then
539  call stat_total( total, atmos_phy_rd_sflx_lw_up(:,:), var_name(1) )
540  call stat_total( total, atmos_phy_rd_sflx_lw_dn(:,:), var_name(2) )
541  call stat_total( total, atmos_phy_rd_sflx_sw_up(:,:), var_name(3) )
542  call stat_total( total, atmos_phy_rd_sflx_sw_dn(:,:), var_name(4) )
543  call stat_total( total, atmos_phy_rd_toaflx_lw_up(:,:), var_name(5) )
544  call stat_total( total, atmos_phy_rd_toaflx_lw_dn(:,:), var_name(6) )
545  call stat_total( total, atmos_phy_rd_toaflx_sw_up(:,:), var_name(7) )
546  call stat_total( total, atmos_phy_rd_toaflx_sw_dn(:,:), var_name(8) )
547  call stat_total( total, atmos_phy_rd_sflx_downall(:,:,1,1), var_name(9) )
548  call stat_total( total, atmos_phy_rd_sflx_downall(:,:,1,2), var_name(10) )
549  call stat_total( total, atmos_phy_rd_sflx_downall(:,:,2,1), var_name(11) )
550  call stat_total( total, atmos_phy_rd_sflx_downall(:,:,2,2), var_name(12) )
551  endif
552 
553  call fileio_write_var( restart_fid, var_id(1), atmos_phy_rd_sflx_lw_up(:,:), &
554  var_name(1) , 'XY' ) ! [IN]
555  call fileio_write_var( restart_fid, var_id(2), atmos_phy_rd_sflx_lw_dn(:,:), &
556  var_name(2) , 'XY' ) ! [IN]
557  call fileio_write_var( restart_fid, var_id(3), atmos_phy_rd_sflx_sw_up(:,:), &
558  var_name(3) , 'XY' ) ! [IN]
559  call fileio_write_var( restart_fid, var_id(4), atmos_phy_rd_sflx_sw_dn(:,:), &
560  var_name(4) , 'XY' ) ! [IN]
561  call fileio_write_var( restart_fid, var_id(5), atmos_phy_rd_toaflx_lw_up(:,:), &
562  var_name(5) , 'XY' ) ! [IN]
563  call fileio_write_var( restart_fid, var_id(6), atmos_phy_rd_toaflx_lw_dn(:,:), &
564  var_name(6) , 'XY' ) ! [IN]
565  call fileio_write_var( restart_fid, var_id(7), atmos_phy_rd_toaflx_sw_up(:,:), &
566  var_name(7) , 'XY' ) ! [IN]
567  call fileio_write_var( restart_fid, var_id(8), atmos_phy_rd_toaflx_sw_dn(:,:), &
568  var_name(8) , 'XY' ) ! [IN]
569  call fileio_write_var( restart_fid, var_id(9), atmos_phy_rd_sflx_downall(:,:,1,1), &
570  var_name(9) , 'XY' ) ! [IN]
571  call fileio_write_var( restart_fid, var_id(10), atmos_phy_rd_sflx_downall(:,:,1,2), &
572  var_name(10), 'XY' ) ! [IN]
573  call fileio_write_var( restart_fid, var_id(11), atmos_phy_rd_sflx_downall(:,:,2,1), &
574  var_name(11), 'XY' ) ! [IN]
575  call fileio_write_var( restart_fid, var_id(12), atmos_phy_rd_sflx_downall(:,:,2,2), &
576  var_name(12), 'XY' ) ! [IN]
577 
578  endif
579 
580  return
logical, public statistics_checktotal
calc&report variable totals to logfile?
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
module FILE I/O (netcdf)
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_up
module Statistics
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_toaflx_lw_dn
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_downall
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_up
Here is the call graph for this function:
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.

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

47  logical, public :: ATMOS_PHY_RD_RESTART_OUTPUT = .false.

◆ 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.

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

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

◆ 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 50 of file mod_atmos_phy_rd_vars.f90.

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

50  logical, public :: ATMOS_PHY_RD_RESTART_IN_POSTFIX_TIMELABEL = .false.

◆ 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 51 of file mod_atmos_phy_rd_vars.f90.

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

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

◆ 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 52 of file mod_atmos_phy_rd_vars.f90.

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

52  logical, public :: ATMOS_PHY_RD_RESTART_OUT_POSTFIX_TIMELABEL = .true.

◆ 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 53 of file mod_atmos_phy_rd_vars.f90.

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

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

◆ 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 54 of file mod_atmos_phy_rd_vars.f90.

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().

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

◆ atmos_phy_rd_rhot_t

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

Definition at line 56 of file mod_atmos_phy_rd_vars.f90.

Referenced by mod_atmos_phy_rd_driver::atmos_phy_rd_driver(), and atmos_phy_rd_vars_setup().

56  real(RP), public, allocatable :: ATMOS_PHY_RD_RHOT_t(:,:,:) ! tendency RHOT [K*kg/m3/s]

◆ 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_toaflx_lw_up

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

◆ atmos_phy_rd_toaflx_lw_dn

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

◆ atmos_phy_rd_toaflx_sw_up

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

◆ atmos_phy_rd_toaflx_sw_dn

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

◆ atmos_phy_rd_sflx_downall

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

◆ atmos_phy_rd_solins

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

Definition at line 70 of file mod_atmos_phy_rd_vars.f90.

Referenced by mod_atmos_phy_rd_driver::atmos_phy_rd_driver(), mod_atmos_phy_rd_driver::atmos_phy_rd_driver_setup(), and atmos_phy_rd_vars_setup().

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

◆ atmos_phy_rd_cossza

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

Definition at line 71 of file mod_atmos_phy_rd_vars.f90.

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

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