SCALE-RM
scale_external_input_rm.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 !-------------------------------------------------------------------------------
12  !-----------------------------------------------------------------------------
13  !
14  !++ Used modules
15  !
16  use scale_precision
17  use scale_stdio
18  use scale_prof
22  !-----------------------------------------------------------------------------
23  implicit none
24  private
25  !-----------------------------------------------------------------------------
26  !
27  !++ Public procedures
28  !
29  public :: extin_rm_get_dims_1d
30  public :: extin_rm_get_dims_2d
31  public :: extin_rm_get_dims_3d
32 
33  !-----------------------------------------------------------------------------
34  !
35  !++ Public parameters & variables
36  !
37  !-----------------------------------------------------------------------------
38  !
39  !++ Private procedures
40  !
41  !-----------------------------------------------------------------------------
42  !
43  !++ Private parameters & variables
44  !
45  !-----------------------------------------------------------------------------
46 contains
47  !-----------------------------------------------------------------------------
49  subroutine extin_rm_get_dims_1d( &
50  dim1_max, &
51  dim1_S, &
52  dim1_E, &
53  varname, &
54  axistype )
55  use scale_process, only: &
57  implicit none
58  integer, intent(out) :: dim1_max
59  integer, intent(out) :: dim1_s
60  integer, intent(out) :: dim1_e
61  character(len=*), intent(in) :: varname
62  character(len=*), intent(in) :: axistype ! axis type (Z/X/Y)
63 
64  select case ( axistype )
65  case ( 'Z' )
66  dim1_max = kmax
67  dim1_s = ks
68  dim1_e = ke
69  case ( 'X' )
70  dim1_max = imaxb
71  dim1_s = isb
72  dim1_e = ieb
73  case ( 'Y' )
74  dim1_max = jmaxb
75  dim1_s = jsb
76  dim1_e = jeb
77  case default
78  write(*,*) 'xxx [EXTIN_RM_get_dims_1D] unsupported axis type. Check! axistype:', trim(axistype), ', item:',trim(varname)
79  call prc_mpistop
80  end select
81 
82  return
83  end subroutine extin_rm_get_dims_1d
84 
85  subroutine extin_rm_get_dims_2d( &
86  dim1_max, &
87  dim1_S, &
88  dim1_E, &
89  dim2_max, &
90  dim2_S, &
91  dim2_E, &
92  transpose, &
93  varname, &
94  axistype )
95  use scale_process, only: &
97  implicit none
98  integer, intent(out) :: dim1_max
99  integer, intent(out) :: dim1_s
100  integer, intent(out) :: dim1_e
101  integer, intent(out) :: dim2_max
102  integer, intent(out) :: dim2_s
103  integer, intent(out) :: dim2_e
104  logical, intent(out) :: transpose
105  character(len=*), intent(in) :: varname
106  character(len=*), intent(in) :: axistype ! axis type (XY/XZ/ZX)
107 
108  select case ( axistype )
109  case ( 'XY' )
110  dim1_max = imaxb
111  dim2_max = jmaxb
112  dim1_s = isb
113  dim1_e = ieb
114  dim2_s = jsb
115  dim2_e = jeb
116  transpose = .false.
117  case ( 'ZX' )
118  dim1_max = kmax
119  dim2_max = imaxb
120  dim1_s = ks
121  dim1_e = ke
122  dim2_s = isb
123  dim2_e = ieb
124  transpose = .false.
125  case ( 'XZ' )
126  dim1_max = imaxb
127  dim2_max = kmax
128  dim1_s = isb
129  dim1_e = ieb
130  dim2_s = ks
131  dim2_e = ke
132  transpose = .true.
133  case default
134  write(*,*) 'xxx [EXTIN_RM_get_dims_2D] unsupported axis type. Check! axistype:', trim(axistype), ', item:',trim(varname)
135  call prc_mpistop
136  end select
137 
138  return
139  end subroutine extin_rm_get_dims_2d
140 
141  subroutine extin_rm_get_dims_3d( &
142  dim1_max, &
143  dim1_S, &
144  dim1_E, &
145  dim2_max, &
146  dim2_S, &
147  dim2_E, &
148  dim3_max, &
149  dim3_S, &
150  dim3_E, &
151  transpose, &
152  varname, &
153  axistype )
154  use scale_process, only: &
156  implicit none
157  integer, intent(out) :: dim1_max
158  integer, intent(out) :: dim1_s
159  integer, intent(out) :: dim1_e
160  integer, intent(out) :: dim2_max
161  integer, intent(out) :: dim2_s
162  integer, intent(out) :: dim2_e
163  integer, intent(out) :: dim3_max
164  integer, intent(out) :: dim3_s
165  integer, intent(out) :: dim3_e
166  logical, intent(out) :: transpose
167  character(len=*), intent(in) :: varname
168  character(len=*), intent(in) :: axistype ! axis type (ZXY/XYZ/LXY/XYL/UXY/XYU)
169 
170  select case ( axistype )
171  case ( 'ZXY' )
172  dim1_max = kmax
173  dim2_max = imaxb
174  dim3_max = jmaxb
175  dim1_s = ks
176  dim1_e = ke
177  dim2_s = isb
178  dim2_e = ieb
179  dim3_s = jsb
180  dim3_e = jeb
181  transpose = .false.
182  case ( 'XYZ' )
183  dim1_max = imaxb
184  dim2_max = jmaxb
185  dim3_max = kmax
186  dim1_s = isb
187  dim1_e = ieb
188  dim2_s = jsb
189  dim2_e = jeb
190  dim3_s = ks
191  dim3_e = ke
192  transpose = .true.
193  case ( 'LXY' ) ! LAND
194  dim1_max = lkmax
195  dim2_max = imaxb
196  dim3_max = jmaxb
197  dim1_s = lks
198  dim1_e = lke
199  dim2_s = isb
200  dim2_e = ieb
201  dim3_s = jsb
202  dim3_e = jeb
203  transpose = .false.
204  case ( 'XYL' ) ! LAND
205  dim1_max = imaxb
206  dim2_max = jmaxb
207  dim3_max = lkmax
208  dim1_s = isb
209  dim1_e = ieb
210  dim2_s = jsb
211  dim2_e = jeb
212  dim3_s = lks
213  dim3_e = lke
214  transpose = .true.
215  case ( 'UXY' )
216  dim1_max = ukmax
217  dim2_max = imaxb
218  dim3_max = jmaxb
219  dim1_s = uks
220  dim1_e = uke
221  dim2_s = isb
222  dim2_e = ieb
223  dim3_s = jsb
224  dim3_e = jeb
225  transpose = .false.
226  case ( 'XYU' )
227  dim1_max = imaxb
228  dim2_max = jmaxb
229  dim3_max = ukmax
230  dim1_s = isb
231  dim1_e = ieb
232  dim2_s = jsb
233  dim2_e = jeb
234  dim3_s = uks
235  dim3_e = uke
236  transpose = .true.
237  case default
238  write(*,*) 'xxx [EXTIN_RM_get_dims_3D] unsupported axis type. Check! axistype:', trim(axistype), ', item:',trim(varname)
239  call prc_mpistop
240  end select
241 
242  return
243  end subroutine extin_rm_get_dims_3d
244 
245 end module scale_external_input_rm
subroutine, public prc_mpistop
Abort MPI.
integer, public jeb
subroutine, public extin_rm_get_dims_2d(dim1_max, dim1_S, dim1_E, dim2_max, dim2_S, dim2_E, transpose, varname, axistype)
module STDIO
Definition: scale_stdio.F90:12
integer, public ke
end point of inner domain: z, local
integer, public imaxb
integer, public jmaxb
integer, public ieb
module grid index
subroutine, public extin_rm_get_dims_3d(dim1_max, dim1_S, dim1_E, dim2_max, dim2_S, dim2_E, dim3_max, dim3_S, dim3_E, transpose, varname, axistype)
integer, public kmax
of computational cells: z, local
module PROCESS
integer, public ks
start point of inner domain: z, local
module profiler
Definition: scale_prof.F90:10
subroutine, public extin_rm_get_dims_1d(dim1_max, dim1_S, dim1_E, varname, axistype)
get_dims
module PRECISION
integer, public isb
module land grid index
integer, public jsb
module urban grid index