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 
scale_atmos_grid_icoa_index::adm_glevel
integer, public adm_glevel
Definition: scale_atmos_grid_icoA_index.F90:54
scale_atmos_grid_icoa_index::adm_ai
integer, parameter, public adm_ai
Definition: scale_atmos_grid_icoA_index.F90:38
scale_atmos_grid_cartesc_index::ke
integer, public ke
end point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:52
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_atmos_grid_icoa_index::adm_tj
integer, parameter, public adm_tj
Definition: scale_atmos_grid_icoA_index.F90:35
scale_atmos_grid_icoa_index::adm_gmin_pl
integer, parameter, public adm_gmin_pl
Definition: scale_atmos_grid_icoA_index.F90:78
scale_atmos_grid_icoa_index::adm_vlayer
integer, public adm_vlayer
Definition: scale_atmos_grid_icoA_index.F90:55
scale_atmos_grid_icoa_index::atmos_grid_icoa_index_setup
subroutine, public atmos_grid_icoa_index_setup
setup index
Definition: scale_atmos_grid_icoA_index.F90:112
scale_prc_icoa::prc_rgn_vlink
integer, public prc_rgn_vlink
maximum number of vertex linkage, ICO:5
Definition: scale_prc_icoA.F90:68
scale_atmos_grid_cartesc_index::ihalo
integer, public ihalo
Definition: scale_atmos_grid_cartesC_index.F90:44
scale_atmos_grid_icoa_index::adm_ti
integer, parameter, public adm_ti
Definition: scale_atmos_grid_icoA_index.F90:34
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_atmos_grid_cartesc_index::ka
integer, public ka
Definition: scale_atmos_grid_cartesC_index.F90:47
scale_atmos_grid_icoa_index::adm_kall
integer, public adm_kall
Definition: scale_atmos_grid_icoA_index.F90:82
scale_atmos_grid_icoa_index::adm_lall_pl
integer, parameter, public adm_lall_pl
Definition: scale_atmos_grid_icoA_index.F90:59
scale_atmos_grid_icoa_index::adm_kmin
integer, public adm_kmin
Definition: scale_atmos_grid_icoA_index.F90:83
scale_atmos_grid_icoa_index::adm_kmax
integer, public adm_kmax
Definition: scale_atmos_grid_icoA_index.F90:84
scale_atmos_grid_icoa_index::adm_imax
integer, public adm_imax
Definition: scale_atmos_grid_icoA_index.F90:70
scale_atmos_grid_icoa_index::adm_jmax
integer, public adm_jmax
Definition: scale_atmos_grid_icoA_index.F90:73
scale_atmos_grid_icoa_index::adm_aj
integer, parameter, public adm_aj
Definition: scale_atmos_grid_icoA_index.F90:40
scale_atmos_grid_icoa_index::adm_gall
integer, public adm_gall
Definition: scale_atmos_grid_icoA_index.F90:62
scale_atmos_grid_cartesc_index::khalo
integer, parameter, public khalo
Definition: scale_atmos_grid_cartesC_index.F90:43
scale_prc_icoa
module process / icoA
Definition: scale_prc_icoA.F90:11
scale_atmos_grid_cartesc_index::imax
integer, public imax
Definition: scale_atmos_grid_cartesC_index.F90:37
scale_atmos_grid_icoa_index::adm_gmin
integer, public adm_gmin
Definition: scale_atmos_grid_icoA_index.F90:65
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_atmos_grid_icoa_index::adm_gmax_pl
integer, public adm_gmax_pl
Definition: scale_atmos_grid_icoA_index.F90:79
scale_atmos_grid_icoa_index::adm_gslf_pl
integer, parameter, public adm_gslf_pl
Definition: scale_atmos_grid_icoA_index.F90:77
scale_atmos_grid_cartesc_index::ie
integer, public ie
end point of inner domain: x, local
Definition: scale_atmos_grid_cartesC_index.F90:54
scale_io
module STDIO
Definition: scale_io.F90:10
scale_atmos_grid_icoa_index::adm_iall
integer, public adm_iall
Definition: scale_atmos_grid_icoA_index.F90:68
scale_atmos_grid_icoa_index::adm_gall_1d
integer, public adm_gall_1d
Definition: scale_atmos_grid_icoA_index.F90:64
scale_atmos_grid_cartesc_index::ia
integer, public ia
Definition: scale_atmos_grid_cartesC_index.F90:48
scale_atmos_grid_cartesc_index::kmax
integer, public kmax
Definition: scale_atmos_grid_cartesC_index.F90:36
scale_atmos_grid_icoa_index::adm_jall
integer, public adm_jall
Definition: scale_atmos_grid_icoA_index.F90:71
scale_atmos_grid_icoa_index::adm_vlink
integer, public adm_vlink
Definition: scale_atmos_grid_icoA_index.F90:75
scale_atmos_grid_icoa_index::adm_imin
integer, public adm_imin
Definition: scale_atmos_grid_icoA_index.F90:69
scale_atmos_grid_icoa_index::adm_gmax
integer, public adm_gmax
Definition: scale_atmos_grid_icoA_index.F90:66
scale_prc_icoa::prc_rgn_local
integer, public prc_rgn_local
number of regular region (local)
Definition: scale_prc_icoA.F90:72
scale_atmos_grid_icoa_index::adm_nxyz
integer, parameter, public adm_nxyz
Definition: scale_atmos_grid_icoA_index.F90:46
scale_atmos_grid_icoa_index::adm_jmin
integer, public adm_jmin
Definition: scale_atmos_grid_icoA_index.F90:72
scale_atmos_grid_cartesc_index::is
integer, public is
start point of inner domain: x, local
Definition: scale_atmos_grid_cartesC_index.F90:53
scale_atmos_grid_cartesc_index::jhalo
integer, public jhalo
Definition: scale_atmos_grid_cartesC_index.F90:45
scale_atmos_grid_cartesc_index::ja
integer, public ja
Definition: scale_atmos_grid_cartesC_index.F90:49
scale_prc_icoa::prc_rgn_level
integer, public prc_rgn_level
region division level
Definition: scale_prc_icoA.F90:66
scale_prc_icoa::prc_rgn_total
integer, public prc_rgn_total
number of regular region (global total)
Definition: scale_prc_icoA.F90:71
scale_atmos_grid_cartesc_index::ks
integer, public ks
start point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:51
scale_atmos_grid_icoa_index::adm_gall_pl
integer, public adm_gall_pl
Definition: scale_atmos_grid_icoA_index.F90:76
scale_atmos_grid_icoa_index
module atmosphere / grid / icosahedralA / index
Definition: scale_atmos_grid_icoA_index.F90:12
scale_atmos_grid_cartesc_index::jmax
integer, public jmax
Definition: scale_atmos_grid_cartesC_index.F90:38
scale_atmos_grid_cartesc_index::js
integer, public js
start point of inner domain: y, local
Definition: scale_atmos_grid_cartesC_index.F90:55
scale_atmos_grid_icoa_index::adm_lall
integer, public adm_lall
Definition: scale_atmos_grid_icoA_index.F90:58
scale_atmos_grid_icoa_index::adm_knone
integer, parameter, public adm_knone
Definition: scale_atmos_grid_icoA_index.F90:43
scale_atmos_grid_icoa_index::adm_gall_in
integer, public adm_gall_in
Definition: scale_atmos_grid_icoA_index.F90:63
scale_atmos_grid_icoa_index::adm_aij
integer, parameter, public adm_aij
Definition: scale_atmos_grid_icoA_index.F90:39
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:56
scale_atmos_grid_cartesc_index::je
integer, public je
end point of inner domain: y, local
Definition: scale_atmos_grid_cartesC_index.F90:56