1 | #LyX 2.2 created this file. For more info see http://www.lyx.org/ |
---|
2 | \lyxformat 508 |
---|
3 | \begin_document |
---|
4 | \begin_header |
---|
5 | \save_transient_properties true |
---|
6 | \origin unavailable |
---|
7 | \textclass book |
---|
8 | \use_default_options true |
---|
9 | \master ../../XIOS_user_guide.lyx |
---|
10 | \maintain_unincluded_children false |
---|
11 | \language english |
---|
12 | \language_package default |
---|
13 | \inputencoding auto |
---|
14 | \fontencoding global |
---|
15 | \font_roman "default" "default" |
---|
16 | \font_sans "default" "default" |
---|
17 | \font_typewriter "default" "default" |
---|
18 | \font_math "auto" "auto" |
---|
19 | \font_default_family default |
---|
20 | \use_non_tex_fonts false |
---|
21 | \font_sc false |
---|
22 | \font_osf false |
---|
23 | \font_sf_scale 100 100 |
---|
24 | \font_tt_scale 100 100 |
---|
25 | \graphics default |
---|
26 | \default_output_format default |
---|
27 | \output_sync 0 |
---|
28 | \bibtex_command default |
---|
29 | \index_command default |
---|
30 | \float_placement !tph |
---|
31 | \paperfontsize default |
---|
32 | \spacing single |
---|
33 | \use_hyperref false |
---|
34 | \papersize a4paper |
---|
35 | \use_geometry false |
---|
36 | \use_package amsmath 1 |
---|
37 | \use_package amssymb 1 |
---|
38 | \use_package cancel 1 |
---|
39 | \use_package esint 1 |
---|
40 | \use_package mathdots 1 |
---|
41 | \use_package mathtools 1 |
---|
42 | \use_package mhchem 1 |
---|
43 | \use_package stackrel 1 |
---|
44 | \use_package stmaryrd 1 |
---|
45 | \use_package undertilde 1 |
---|
46 | \cite_engine basic |
---|
47 | \cite_engine_type default |
---|
48 | \biblio_style plain |
---|
49 | \use_bibtopic false |
---|
50 | \use_indices false |
---|
51 | \paperorientation portrait |
---|
52 | \suppress_date false |
---|
53 | \justification true |
---|
54 | \use_refstyle 1 |
---|
55 | \index Index |
---|
56 | \shortcut idx |
---|
57 | \color #008000 |
---|
58 | \end_index |
---|
59 | \secnumdepth 3 |
---|
60 | \tocdepth 3 |
---|
61 | \paragraph_separation indent |
---|
62 | \paragraph_indentation default |
---|
63 | \quotes_language english |
---|
64 | \papercolumns 1 |
---|
65 | \papersides 1 |
---|
66 | \paperpagestyle default |
---|
67 | \tracking_changes false |
---|
68 | \output_changes false |
---|
69 | \html_math_output 0 |
---|
70 | \html_css_as_file 0 |
---|
71 | \html_be_strict false |
---|
72 | \end_header |
---|
73 | |
---|
74 | \begin_body |
---|
75 | |
---|
76 | \begin_layout Chapter |
---|
77 | Axis |
---|
78 | \end_layout |
---|
79 | |
---|
80 | \begin_layout Standard |
---|
81 | Like Domain, Axis is a sub-component of Grid but is one dimension. |
---|
82 | In meteorological applications, axis represents a vertical line with different |
---|
83 | levels. |
---|
84 | \end_layout |
---|
85 | |
---|
86 | \begin_layout Section |
---|
87 | Working with configuration file |
---|
88 | \end_layout |
---|
89 | |
---|
90 | \begin_layout Standard |
---|
91 | The way to define an axis with configuration file is similar to define a |
---|
92 | domain. |
---|
93 | \end_layout |
---|
94 | |
---|
95 | \begin_layout Subsection |
---|
96 | Basic configuration |
---|
97 | \end_layout |
---|
98 | |
---|
99 | \begin_layout Standard |
---|
100 | Similar to domain, an axis is defined inside its definition part with the |
---|
101 | tag |
---|
102 | \series bold |
---|
103 | \color black |
---|
104 | axis_definition |
---|
105 | \series default |
---|
106 | \color inherit |
---|
107 | . |
---|
108 | |
---|
109 | \begin_inset listings |
---|
110 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
111 | inline false |
---|
112 | status open |
---|
113 | |
---|
114 | \begin_layout Plain Layout |
---|
115 | |
---|
116 | <axis_definition> |
---|
117 | \end_layout |
---|
118 | |
---|
119 | \begin_layout Plain Layout |
---|
120 | |
---|
121 | <axis id="axis_A" /> |
---|
122 | \end_layout |
---|
123 | |
---|
124 | \begin_layout Plain Layout |
---|
125 | |
---|
126 | <axis axis_ref="axis_A" /> |
---|
127 | \end_layout |
---|
128 | |
---|
129 | \begin_layout Plain Layout |
---|
130 | |
---|
131 | </axis_definition> |
---|
132 | \end_layout |
---|
133 | |
---|
134 | \end_inset |
---|
135 | |
---|
136 | |
---|
137 | \end_layout |
---|
138 | |
---|
139 | \begin_layout Standard |
---|
140 | The first one is to specify explicitly identification of an axis with an |
---|
141 | id. |
---|
142 | |
---|
143 | \end_layout |
---|
144 | |
---|
145 | \begin_layout Standard |
---|
146 | \begin_inset listings |
---|
147 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
148 | inline false |
---|
149 | status open |
---|
150 | |
---|
151 | \begin_layout Plain Layout |
---|
152 | |
---|
153 | <axis_definition> |
---|
154 | \end_layout |
---|
155 | |
---|
156 | \begin_layout Plain Layout |
---|
157 | |
---|
158 | <axis id="axis_A" /> |
---|
159 | \end_layout |
---|
160 | |
---|
161 | \begin_layout Plain Layout |
---|
162 | |
---|
163 | </axis_definition> |
---|
164 | \end_layout |
---|
165 | |
---|
166 | \end_inset |
---|
167 | |
---|
168 | |
---|
169 | \end_layout |
---|
170 | |
---|
171 | \begin_layout Standard |
---|
172 | In this way, with id, the axis can be processed, e.x modified its attributes, |
---|
173 | with Fortran interface; besides, it is only possible to reference to a |
---|
174 | axis whose id is explicitly defined. |
---|
175 | \end_layout |
---|
176 | |
---|
177 | \begin_layout Standard |
---|
178 | To make a reference to an axis, we use axis_ref |
---|
179 | \end_layout |
---|
180 | |
---|
181 | \begin_layout Standard |
---|
182 | \begin_inset listings |
---|
183 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
184 | inline false |
---|
185 | status open |
---|
186 | |
---|
187 | \begin_layout Plain Layout |
---|
188 | |
---|
189 | <axis_definition> |
---|
190 | \end_layout |
---|
191 | |
---|
192 | \begin_layout Plain Layout |
---|
193 | |
---|
194 | <axis axis_ref="axis_A" /> |
---|
195 | \end_layout |
---|
196 | |
---|
197 | \begin_layout Plain Layout |
---|
198 | |
---|
199 | </axis_definition> |
---|
200 | \end_layout |
---|
201 | |
---|
202 | \end_inset |
---|
203 | |
---|
204 | |
---|
205 | \end_layout |
---|
206 | |
---|
207 | \begin_layout Standard |
---|
208 | An axis defined by axis_ref will inherit all attributes of the referenced |
---|
209 | one, except its id attribute. |
---|
210 | If there is no id specified, an implicit one is assigned to this new axis. |
---|
211 | The axis with implicit id can only be used inside the scope where it is |
---|
212 | defined, it can not be referenced, nor be processed. |
---|
213 | It is useless to define an axis without id inside axis_definition. |
---|
214 | |
---|
215 | \end_layout |
---|
216 | |
---|
217 | \begin_layout Standard |
---|
218 | To define a new axis inside a grid, we use the tag |
---|
219 | \series bold |
---|
220 | \color black |
---|
221 | axis. |
---|
222 | \end_layout |
---|
223 | |
---|
224 | \begin_layout Standard |
---|
225 | \begin_inset listings |
---|
226 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
227 | inline false |
---|
228 | status open |
---|
229 | |
---|
230 | \begin_layout Plain Layout |
---|
231 | |
---|
232 | <grid id="grid_A"> |
---|
233 | \end_layout |
---|
234 | |
---|
235 | \begin_layout Plain Layout |
---|
236 | |
---|
237 | <axis axis_ref="axis_A" /> |
---|
238 | \end_layout |
---|
239 | |
---|
240 | \begin_layout Plain Layout |
---|
241 | |
---|
242 | </grid> |
---|
243 | \end_layout |
---|
244 | |
---|
245 | \end_inset |
---|
246 | |
---|
247 | |
---|
248 | \end_layout |
---|
249 | |
---|
250 | \begin_layout Standard |
---|
251 | The xml lines above can be translated as: the grid_A composed of an axis_A |
---|
252 | that is defined somewhere else before. |
---|
253 | More precisely, the grid grid_A is constituted of a |
---|
254 | \begin_inset Quotes eld |
---|
255 | \end_inset |
---|
256 | |
---|
257 | unknown id |
---|
258 | \begin_inset Quotes erd |
---|
259 | \end_inset |
---|
260 | |
---|
261 | axis which has inherited all attributes (and their values) from axis A |
---|
262 | (name, long name, i_index, j_index, ... |
---|
263 | etc). |
---|
264 | \end_layout |
---|
265 | |
---|
266 | \begin_layout Subsection |
---|
267 | Advanced configuration |
---|
268 | \end_layout |
---|
269 | |
---|
270 | \begin_layout Standard |
---|
271 | Like domain, transformation which can be defined inside an axis. |
---|
272 | All transformations on an axis have form *_axis. |
---|
273 | See Chapter |
---|
274 | \begin_inset CommandInset ref |
---|
275 | LatexCommand ref |
---|
276 | reference "chap:Transformation" |
---|
277 | |
---|
278 | \end_inset |
---|
279 | |
---|
280 | for more details. |
---|
281 | \end_layout |
---|
282 | |
---|
283 | \begin_layout Section |
---|
284 | Working with FORTRAN code |
---|
285 | \end_layout |
---|
286 | |
---|
287 | \begin_layout Standard |
---|
288 | Although axis is not as complex as domain, there are some mandatory attributes |
---|
289 | to define. |
---|
290 | Different from precedent version, XIOS 2.0 supports distribution of data |
---|
291 | on a axis. |
---|
292 | The followings describe the essential parts of axis. |
---|
293 | Details of its attributes and operations can be found in XIOS reference |
---|
294 | guide. |
---|
295 | \end_layout |
---|
296 | |
---|
297 | \begin_layout Subsection |
---|
298 | Local axis index |
---|
299 | \end_layout |
---|
300 | |
---|
301 | \begin_layout Standard |
---|
302 | Axis is often used with domain, which is broken into several distributed |
---|
303 | pieces, to make a 3 dimension grid. |
---|
304 | However, there are cases in which data on axis are distributed among processes. |
---|
305 | Following we consider a simple case: a axis with global size 9 and its |
---|
306 | data are distributed evenly among 3 client processes, each of which has |
---|
307 | size 3. |
---|
308 | \end_layout |
---|
309 | |
---|
310 | \begin_layout Standard |
---|
311 | \begin_inset Float figure |
---|
312 | placement !tbph |
---|
313 | wide false |
---|
314 | sideways false |
---|
315 | status open |
---|
316 | |
---|
317 | \begin_layout Plain Layout |
---|
318 | \begin_inset Graphics |
---|
319 | filename ../images/Distributed_Axis.pdf |
---|
320 | lyxscale 50 |
---|
321 | scale 60 |
---|
322 | |
---|
323 | \end_inset |
---|
324 | |
---|
325 | |
---|
326 | \end_layout |
---|
327 | |
---|
328 | \begin_layout Plain Layout |
---|
329 | \begin_inset Caption Standard |
---|
330 | |
---|
331 | \begin_layout Plain Layout |
---|
332 | Global axis data |
---|
333 | \end_layout |
---|
334 | |
---|
335 | \end_inset |
---|
336 | |
---|
337 | |
---|
338 | \begin_inset CommandInset label |
---|
339 | LatexCommand label |
---|
340 | name "globalAxis" |
---|
341 | |
---|
342 | \end_inset |
---|
343 | |
---|
344 | |
---|
345 | \end_layout |
---|
346 | |
---|
347 | \end_inset |
---|
348 | |
---|
349 | |
---|
350 | \end_layout |
---|
351 | |
---|
352 | \begin_layout Standard |
---|
353 | The local axis can be described by the following way. |
---|
354 | \end_layout |
---|
355 | |
---|
356 | \begin_layout Standard |
---|
357 | Specify the the beginning and size of local axis with: |
---|
358 | \end_layout |
---|
359 | |
---|
360 | \begin_layout Itemize |
---|
361 | n_glo: global size of axis. |
---|
362 | |
---|
363 | \end_layout |
---|
364 | |
---|
365 | \begin_layout Itemize |
---|
366 | begin: global position where a local axis begin |
---|
367 | \end_layout |
---|
368 | |
---|
369 | \begin_layout Itemize |
---|
370 | n: local size of axis on each process |
---|
371 | \end_layout |
---|
372 | |
---|
373 | \begin_layout Standard |
---|
374 | For example, the local axis in the middle (the yellow one) can be specified |
---|
375 | with: |
---|
376 | \end_layout |
---|
377 | |
---|
378 | \begin_layout Standard |
---|
379 | \begin_inset listings |
---|
380 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
381 | inline false |
---|
382 | status open |
---|
383 | |
---|
384 | \begin_layout Plain Layout |
---|
385 | |
---|
386 | CALL xios_set_axis_attr("axis_A",n_glo=9, begin=3, n=3) |
---|
387 | \end_layout |
---|
388 | |
---|
389 | \end_inset |
---|
390 | |
---|
391 | |
---|
392 | \end_layout |
---|
393 | |
---|
394 | \begin_layout Subsection |
---|
395 | Local axis data |
---|
396 | \end_layout |
---|
397 | |
---|
398 | \begin_layout Standard |
---|
399 | Simpler than local domain data, data on axis is always on-dimension. |
---|
400 | Like local domain data, local axis data represent the data offset from |
---|
401 | local axis, and it can be defined in two ways. |
---|
402 | \end_layout |
---|
403 | |
---|
404 | \begin_layout Standard |
---|
405 | Specify the beginning and size of data on the local axis: |
---|
406 | \end_layout |
---|
407 | |
---|
408 | \begin_layout Itemize |
---|
409 | data_begin: the local position of data on axis where data begins |
---|
410 | \end_layout |
---|
411 | |
---|
412 | \begin_layout Itemize |
---|
413 | data_n: size of data on each local axis |
---|
414 | \end_layout |
---|
415 | |
---|
416 | \begin_layout Standard |
---|
417 | Or specify data with its position in the local axis: |
---|
418 | \end_layout |
---|
419 | |
---|
420 | \begin_layout Itemize |
---|
421 | data_index: array of local position of data in the local axis. |
---|
422 | \end_layout |
---|
423 | |
---|
424 | \begin_layout Standard |
---|
425 | Although the valid data must be inside a local axis, it is not necessary |
---|
426 | for data to have same size. |
---|
427 | In fact, data can have larger size than local axis. |
---|
428 | \end_layout |
---|
429 | |
---|
430 | \begin_layout Standard |
---|
431 | \begin_inset listings |
---|
432 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
433 | inline false |
---|
434 | status open |
---|
435 | |
---|
436 | \begin_layout Plain Layout |
---|
437 | |
---|
438 | CALL xios_set_axis_attr("axis_A", data_begin=-1, data_n=n+2) |
---|
439 | \end_layout |
---|
440 | |
---|
441 | \end_inset |
---|
442 | |
---|
443 | |
---|
444 | \end_layout |
---|
445 | |
---|
446 | \begin_layout Standard |
---|
447 | For local axis_A, the negative value of data_begin indicates that data is |
---|
448 | larger than local axis, the valid part of data needs extracted from the |
---|
449 | real data. |
---|
450 | If data_begin has a positive value, that means data size is smaller than |
---|
451 | local axis. |
---|
452 | The default value of data_begin is 0, which implies that local data fit |
---|
453 | into local axis properly. |
---|
454 | |
---|
455 | \end_layout |
---|
456 | |
---|
457 | \begin_layout Standard |
---|
458 | Local data can be defined with: |
---|
459 | \end_layout |
---|
460 | |
---|
461 | \begin_layout Standard |
---|
462 | \begin_inset listings |
---|
463 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
464 | inline false |
---|
465 | status open |
---|
466 | |
---|
467 | \begin_layout Plain Layout |
---|
468 | |
---|
469 | CALL xios_set_axis_attr("axis_A",data_index=data) |
---|
470 | \end_layout |
---|
471 | |
---|
472 | \end_inset |
---|
473 | |
---|
474 | |
---|
475 | \end_layout |
---|
476 | |
---|
477 | \begin_layout Standard |
---|
478 | with |
---|
479 | \end_layout |
---|
480 | |
---|
481 | \begin_layout Itemize |
---|
482 | data = {-1,0,1,2,3} |
---|
483 | \end_layout |
---|
484 | |
---|
485 | \begin_layout Subsection |
---|
486 | Value |
---|
487 | \end_layout |
---|
488 | |
---|
489 | \begin_layout Standard |
---|
490 | Value of axis plays a same role as longitude and latitude of domain. |
---|
491 | As local data, it can be distributed among processes. |
---|
492 | \end_layout |
---|
493 | |
---|
494 | \begin_layout Standard |
---|
495 | \begin_inset listings |
---|
496 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
497 | inline false |
---|
498 | status open |
---|
499 | |
---|
500 | \begin_layout Plain Layout |
---|
501 | |
---|
502 | CALL xios_set_axis_attr("axis_A", value=valueAxis) |
---|
503 | \end_layout |
---|
504 | |
---|
505 | \end_inset |
---|
506 | |
---|
507 | |
---|
508 | \end_layout |
---|
509 | |
---|
510 | \begin_layout Standard |
---|
511 | with |
---|
512 | \end_layout |
---|
513 | |
---|
514 | \begin_layout Itemize |
---|
515 | valueAxis = {30, 40, 50} |
---|
516 | \end_layout |
---|
517 | |
---|
518 | \begin_layout Standard |
---|
519 | Because there is a need of direction of an axis, then comes the attribute |
---|
520 | positive |
---|
521 | \end_layout |
---|
522 | |
---|
523 | \begin_layout Standard |
---|
524 | \begin_inset listings |
---|
525 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
526 | inline false |
---|
527 | status open |
---|
528 | |
---|
529 | \begin_layout Plain Layout |
---|
530 | |
---|
531 | CALL xios_set_axis_attr("axis_A", positive='up') |
---|
532 | \end_layout |
---|
533 | |
---|
534 | \end_inset |
---|
535 | |
---|
536 | |
---|
537 | \end_layout |
---|
538 | |
---|
539 | \begin_layout Standard |
---|
540 | All attributes of axis can be found in Reference Guide. |
---|
541 | \end_layout |
---|
542 | |
---|
543 | \begin_layout Standard |
---|
544 | |
---|
545 | \end_layout |
---|
546 | |
---|
547 | \end_body |
---|
548 | \end_document |
---|