SCALE-RM
scale_file_external_input_cartesC.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  use scale_prof
24  !-----------------------------------------------------------------------------
25  implicit none
26  private
27  !-----------------------------------------------------------------------------
28  !
29  !++ Public procedures
30  !
32 
33  !-----------------------------------------------------------------------------
34  !
35  !++ Public parameters & variables
36  !
37  private :: file_external_input_cartesc_get_dims1d
38  private :: file_external_input_cartesc_get_dims2d
39  private :: file_external_input_cartesc_get_dims3d
40 
41  !-----------------------------------------------------------------------------
42  !
43  !++ Private procedures
44  !
45  !-----------------------------------------------------------------------------
46  !
47  !++ Private parameters & variables
48  !
49  !-----------------------------------------------------------------------------
50 contains
51  !-----------------------------------------------------------------------------
53  !-----------------------------------------------------------------------------
60 
62 
63  file_external_input_get_dims1d => file_external_input_cartesc_get_dims1d
64  file_external_input_get_dims2d => file_external_input_cartesc_get_dims2d
65  file_external_input_get_dims3d => file_external_input_cartesc_get_dims3d
66 
67  return
69 
70  !-----------------------------------------------------------------------------
72  subroutine file_external_input_cartesc_get_dims1d( &
73  dim1_max, &
74  dim1_S, &
75  dim1_E, &
76  varname, &
77  axistype )
78  use scale_prc, only: &
79  prc_abort
80  implicit none
81  integer, intent(out) :: dim1_max
82  integer, intent(out) :: dim1_S
83  integer, intent(out) :: dim1_E
84  character(len=*), intent(in) :: varname
85  character(len=*), intent(in) :: axistype ! axis type (Z/X/Y)
86 
87  select case ( axistype )
88  case ( 'Z' )
89  dim1_max = kmax
90  dim1_s = ks
91  dim1_e = ke
92  case ( 'X' )
93  dim1_max = imaxb
94  dim1_s = isb
95  dim1_e = ieb
96  case ( 'Y' )
97  dim1_max = jmaxb
98  dim1_s = jsb
99  dim1_e = jeb
100  case ( 'OZ' )
101  dim1_max = okmax
102  dim1_s = oks
103  dim1_e = oke
104  case default
105  log_error("FILE_EXTERNAL_INPUT_CARTESC_get_dims1D",*) 'unsupported axis type. Check! axistype:', trim(axistype), ', item:',trim(varname)
106  call prc_abort
107  end select
108 
109  return
110  end subroutine file_external_input_cartesc_get_dims1d
111 
112  subroutine file_external_input_cartesc_get_dims2d( &
113  dim1_max, &
114  dim1_S, &
115  dim1_E, &
116  dim2_max, &
117  dim2_S, &
118  dim2_E, &
119  transpose, &
120  varname, &
121  axistype )
122  use scale_prc, only: &
123  prc_abort
124  implicit none
125  integer, intent(out) :: dim1_max
126  integer, intent(out) :: dim1_S
127  integer, intent(out) :: dim1_E
128  integer, intent(out) :: dim2_max
129  integer, intent(out) :: dim2_S
130  integer, intent(out) :: dim2_E
131  logical, intent(out) :: transpose
132  character(len=*), intent(in) :: varname
133  character(len=*), intent(in) :: axistype ! axis type (XY/XZ/ZX)
134 
135  select case ( axistype )
136  case ( 'XY' )
137  dim1_max = imaxb
138  dim2_max = jmaxb
139  dim1_s = isb
140  dim1_e = ieb
141  dim2_s = jsb
142  dim2_e = jeb
143  transpose = .false.
144  case ( 'ZX' )
145  dim1_max = kmax
146  dim2_max = imaxb
147  dim1_s = ks
148  dim1_e = ke
149  dim2_s = isb
150  dim2_e = ieb
151  transpose = .false.
152  case ( 'XZ' )
153  dim1_max = imaxb
154  dim2_max = kmax
155  dim1_s = isb
156  dim1_e = ieb
157  dim2_s = ks
158  dim2_e = ke
159  transpose = .true.
160  case default
161  log_error("FILE_EXTERNAL_INPUT_CARTESC_get_dims2D",*) 'unsupported axis type. Check! axistype:', trim(axistype), ', item:',trim(varname)
162  call prc_abort
163  end select
164 
165  return
166  end subroutine file_external_input_cartesc_get_dims2d
167 
168  subroutine file_external_input_cartesc_get_dims3d( &
169  dim1_max, &
170  dim1_S, &
171  dim1_E, &
172  dim2_max, &
173  dim2_S, &
174  dim2_E, &
175  dim3_max, &
176  dim3_S, &
177  dim3_E, &
178  transpose, &
179  varname, &
180  axistype )
181  use scale_prc, only: &
182  prc_abort
183  implicit none
184  integer, intent(out) :: dim1_max
185  integer, intent(out) :: dim1_S
186  integer, intent(out) :: dim1_E
187  integer, intent(out) :: dim2_max
188  integer, intent(out) :: dim2_S
189  integer, intent(out) :: dim2_E
190  integer, intent(out) :: dim3_max
191  integer, intent(out) :: dim3_S
192  integer, intent(out) :: dim3_E
193  logical, intent(out) :: transpose
194  character(len=*), intent(in) :: varname
195  character(len=*), intent(in) :: axistype ! axis type (ZXY/XYZ/LXY/XYL/UXY/XYU)
196 
197  select case ( axistype )
198  case ( 'ZXY' )
199  dim1_max = kmax
200  dim2_max = imaxb
201  dim3_max = jmaxb
202  dim1_s = ks
203  dim1_e = ke
204  dim2_s = isb
205  dim2_e = ieb
206  dim3_s = jsb
207  dim3_e = jeb
208  transpose = .false.
209  case ( 'XYZ' )
210  dim1_max = imaxb
211  dim2_max = jmaxb
212  dim3_max = kmax
213  dim1_s = isb
214  dim1_e = ieb
215  dim2_s = jsb
216  dim2_e = jeb
217  dim3_s = ks
218  dim3_e = ke
219  transpose = .true.
220  case ( 'OXY' ) ! OCEAN
221  dim1_max = okmax
222  dim2_max = imaxb
223  dim3_max = jmaxb
224  dim1_s = oks
225  dim1_e = oke
226  dim2_s = isb
227  dim2_e = ieb
228  dim3_s = jsb
229  dim3_e = jeb
230  transpose = .false.
231  case ( 'XYO' ) ! OCEAN
232  dim1_max = imaxb
233  dim2_max = jmaxb
234  dim3_max = okmax
235  dim1_s = isb
236  dim1_e = ieb
237  dim2_s = jsb
238  dim2_e = jeb
239  dim3_s = oks
240  dim3_e = oke
241  transpose = .true.
242  case ( 'LXY' ) ! LAND
243  dim1_max = lkmax
244  dim2_max = imaxb
245  dim3_max = jmaxb
246  dim1_s = lks
247  dim1_e = lke
248  dim2_s = isb
249  dim2_e = ieb
250  dim3_s = jsb
251  dim3_e = jeb
252  transpose = .false.
253  case ( 'XYL' ) ! LAND
254  dim1_max = imaxb
255  dim2_max = jmaxb
256  dim3_max = lkmax
257  dim1_s = isb
258  dim1_e = ieb
259  dim2_s = jsb
260  dim2_e = jeb
261  dim3_s = lks
262  dim3_e = lke
263  transpose = .true.
264  case ( 'UXY' )
265  dim1_max = ukmax
266  dim2_max = imaxb
267  dim3_max = jmaxb
268  dim1_s = uks
269  dim1_e = uke
270  dim2_s = isb
271  dim2_e = ieb
272  dim3_s = jsb
273  dim3_e = jeb
274  transpose = .false.
275  case ( 'XYU' )
276  dim1_max = imaxb
277  dim2_max = jmaxb
278  dim3_max = ukmax
279  dim1_s = isb
280  dim1_e = ieb
281  dim2_s = jsb
282  dim2_e = jeb
283  dim3_s = uks
284  dim3_e = uke
285  transpose = .true.
286  case default
287  log_error("FILE_EXTERNAL_INPUT_CARTESC_get_dims3D",*) 'unsupported axis type. Check! axistype:', trim(axistype), ', item:',trim(varname)
288  call prc_abort
289  end select
290 
291  return
292  end subroutine file_external_input_cartesc_get_dims3d
293 
module file / external_input_cartesC
module land / grid / cartesianC / index
module file / external_input
module urban / grid / icosahedralA / index
procedure(get_dims2d), pointer, public file_external_input_get_dims2d
module atmosphere / grid / cartesC index
integer, public ke
end point of inner domain: z, local
module PROCESS
Definition: scale_prc.F90:11
integer, public ks
start point of inner domain: z, local
integer, public kmax
of computational cells: z, local
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
module ocean / grid / cartesianC / index
module profiler
Definition: scale_prof.F90:11
subroutine, public file_external_input_setup
Setup.
module PRECISION
module STDIO
Definition: scale_io.F90:10
procedure(get_dims3d), pointer, public file_external_input_get_dims3d
procedure(get_dims1d), pointer, public file_external_input_get_dims1d