SCALE-RM
scale_atmos_grid_icoA_index.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 !-------------------------------------------------------------------------------
11 #include "scalelib.h"
13  !-----------------------------------------------------------------------------
14  !
15  !++ used modules
16  !
17  use scale_precision
18  use scale_io
19  !-----------------------------------------------------------------------------
20  implicit none
21  private
22  !-----------------------------------------------------------------------------
23  !
24  !++ Public procedure
25  !
27 
28  !-----------------------------------------------------------------------------
29  !
30  !++ Public parameters & variables
31  !
32 
33  ! Identifier of triangle element (i-axis-side or j-axis side)
34  integer, public, parameter :: adm_ti = 1
35  integer, public, parameter :: adm_tj = 2
36 
37  ! Identifier of arc element (i-axis-side, ij-axis side, or j-axis side)
38  integer, public, parameter :: adm_ai = 1
39  integer, public, parameter :: adm_aij = 2
40  integer, public, parameter :: adm_aj = 3
41 
42  ! Identifier of 1 variable
43  integer, public, parameter :: adm_knone = 1
44 
45  ! dimension of the spacial vector
46  integer, public, parameter :: adm_nxyz = 3
47 
48  ! number of HALOs
49  integer, public, parameter :: khalo = 1
50  integer, public :: ihalo = 1
51  integer, public :: jhalo = 1
52 
53  ! main parameter
54  integer, public :: adm_glevel ! grid division level
55  integer, public :: adm_vlayer ! number of vertical layer
56 
57  ! region
58  integer, public :: adm_lall ! number of regular region per process
59  integer, public, parameter :: adm_lall_pl = 2 ! number of pole region per process
60 
61  ! horizontal grid
62  integer, public :: adm_gall ! number of horizontal grid per regular region
63  integer, public :: adm_gall_in ! number of horizontal grid (inner part)
64  integer, public :: adm_gall_1d ! number of horizontal grid (1D)
65  integer, public :: adm_gmin ! start index of 1D horizontal grid
66  integer, public :: adm_gmax ! end index of 1D horizontal grid
67 
68  integer, public :: adm_iall ! number of horizontal grid per regular region (i-axis)
69  integer, public :: adm_imin ! start index of 1D horizontal grid
70  integer, public :: adm_imax ! end index of 1D horizontal grid
71  integer, public :: adm_jall ! number of horizontal grid per regular region (j-axis)
72  integer, public :: adm_jmin ! start index of 1D horizontal grid
73  integer, public :: adm_jmax ! end index of 1D horizontal grid
74 
75  integer, public :: adm_vlink = -1 ! maximum number of vertex linkage, ICO:5, PSP:6, LCP, MLCP:k
76  integer, public :: adm_gall_pl ! number of horizontal grid for pole region
77  integer, public, parameter :: adm_gslf_pl = 1 ! index for pole point
78  integer, public, parameter :: adm_gmin_pl = 2 ! start index of grid around the pole point
79  integer, public :: adm_gmax_pl ! end index of grid around the pole point
80 
81  ! vertical grid
82  integer, public :: adm_kall ! number of vertical grid
83  integer, public :: adm_kmin ! start index of vertical grid
84  integer, public :: adm_kmax ! end index of vertical grid
85 
86  ! for physics grid
87  integer, public :: ks
88  integer, public :: ke
89  integer, public :: ka
90  integer, public :: imax = -1
91  integer, public, parameter :: is = 1
92  integer, public :: ie
93  integer, public :: ia
94  integer, public :: jmax = -1
95  integer, public, parameter :: js = 1
96  integer, public :: je
97  integer, public :: ja
98 
99  !-----------------------------------------------------------------------------
100  !
101  !++ Private procedure
102  !
103  !-----------------------------------------------------------------------------
104  !
105  !++ Private parameters & variables
106  !
107  !-----------------------------------------------------------------------------
108 contains
109  !-----------------------------------------------------------------------------
111  subroutine atmos_grid_icoa_index_setup
112  use scale_prc, only: &
113  prc_abort
114  use scale_prc_icoa, only: &
115  prc_rgn_level, &
116  prc_rgn_total, &
117  prc_rgn_local, &
119  implicit none
120 
121  integer :: GRID_LEVEL = -1
122  integer :: KMAX = -1
123 
124  namelist / param_atmos_grid_icoa_index / &
125  grid_level, &
126  kmax
127 
128  integer :: nmax
129 
130  integer :: ierr
131  !---------------------------------------------------------------------------
132 
133  log_newline
134  log_info("ATMOS_GRID_ICOA_INDEX_setup",*) 'Setup'
135 
136  !--- read namelist
137  rewind(io_fid_conf)
138  read(io_fid_conf,nml=param_atmos_grid_icoa_index,iostat=ierr)
139  if( ierr < 0 ) then !--- missing
140  log_info("ATMOS_GRID_ICOA_INDEX_setup",*) 'Not found namelist. Default used.'
141  elseif( ierr > 0 ) then !--- fatal error
142  log_error("ATMOS_GRID_ICOA_INDEX_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_GRID_ICOA_INDEX. Check!'
143  call prc_abort
144  endif
145  log_nml(param_atmos_grid_icoa_index)
146 
147  ! Error if glevel & rlevel are not defined
148  if ( grid_level < 1 ) then
149  log_error("ATMOS_GRID_ICOA_INDEX_setup",*) 'GRID_LEVEL must be >= 1! ', grid_level
150  call prc_abort
151  endif
152 
153  if ( kmax < 1 ) then
154  log_error("ATMOS_GRID_ICOA_INDEX_setup",*) 'KMAX must be >= 1! ', kmax
155  call prc_abort
156  end if
157 
158  adm_glevel = grid_level
159  adm_vlayer = kmax
160 
162 
163  nmax = 2**(grid_level-prc_rgn_level)
164  adm_gall_1d = 1 + nmax + 1
165  adm_gmin = 1 + 1
166  adm_gmax = 1 + nmax
167 
168  adm_gall = ( 1+nmax+1 ) * ( 1+nmax+1 )
169  adm_gall_in = ( nmax+1 ) * ( nmax+1 )
170 
171  adm_imin = 1 + 1
172  adm_imax = 1 + nmax
173  adm_iall = 1 + nmax + 1
174  adm_jmin = 1 + 1
175  adm_jmax = 1 + nmax
176  adm_jall = 1 + nmax + 1
177 
181 
182  if ( adm_vlayer == 1 ) then
183  adm_kall = 1
184  adm_kmin = 1
185  adm_kmax = 1
186  else
187  adm_kall = 1 + kmax + 1
188  adm_kmin = 1 + 1
189  adm_kmax = 1 + kmax
190  endif
191 
192  ! for physics grid
193  ks = adm_kmin
194  ke = adm_kmax
195  ka = adm_kall
196 
197  imax = nmax
198  ! IS = 1
199  ie = nmax + 1
200  ia = ie
201 
202  jmax = nmax
203  ! JS = 1
204  je = nmax + 1
205  ja = je
206 
207  log_newline
208  log_info("ATMOS_GRID_ICOA_INDEX_setup",'(1x,A)') 'Grid management information'
209  log_info_cont('(1x,A,I4)' ) 'Grid divisiona level (GL) : ', grid_level
210  log_info_cont('(1x,A,I7,2(A,I4),A,I7,A)') 'Total number of grid (horizontal) : ', &
211  4**(grid_level-prc_rgn_level)*prc_rgn_total, &
212  ' (', 2**(grid_level-prc_rgn_level), &
213  ' x', 2**(grid_level-prc_rgn_level), &
214  ' x', prc_rgn_total, ' ) + 2 (pole)'
215  log_info_cont('(1x,A,I7)') 'Number of vertical layer : ', adm_kmax-adm_kmin+1
216 
217  return
218  end subroutine atmos_grid_icoa_index_setup
219 
220 
integer, public jmax
of computational cells: y, local
integer, parameter, public khalo
of halo cells: z
subroutine, public atmos_grid_icoa_index_setup
setup index
integer, public imax
of computational cells: x, local
integer, public ia
of whole cells: x, local, with HALO
integer, parameter, public adm_gmin_pl
integer, parameter, public adm_gslf_pl
integer, public ja
of whole cells: y, local, with HALO
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
integer, parameter, public adm_lall_pl
integer, public is
start point of inner domain: x, local
integer, public ie
end point of inner domain: x, local
integer, public ke
end point of inner domain: z, local
module PROCESS
Definition: scale_prc.F90:11
integer, public je
end point of inner domain: y, local
integer, public prc_rgn_level
region division level
integer, public ks
start point of inner domain: z, local
integer, public prc_rgn_total
number of regular region (global total)
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
integer, public js
start point of inner domain: y, local
integer, public prc_rgn_local
number of regular region (local)
module atmosphere / grid / icosahedralA / index
module PRECISION
integer, public ka
of whole cells: z, local, with HALO
integer, parameter, public adm_knone
module STDIO
Definition: scale_io.F90:10
integer, public prc_rgn_vlink
maximum number of vertex linkage, ICO:5
module process / icoA