source: XIOS/trunk/doc/inputs/user/Axis.lyx @ 1533

Last change on this file since 1533 was 1084, checked in by mhnguyen, 5 years ago

Update user guide and reference guide

File size: 11.0 KB
Line 
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
77Axis
78\end_layout
79
80\begin_layout Standard
81Like 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
87Working with configuration file
88\end_layout
89
90\begin_layout Standard
91The way to define an axis with configuration file is similar to define a
92 domain.
93\end_layout
94
95\begin_layout Subsection
96Basic configuration
97\end_layout
98
99\begin_layout Standard
100Similar to domain, an axis is defined inside its definition part with the
101 tag
102\series bold
103\color black
104axis_definition
105\series default
106\color inherit
107.
108 
109\begin_inset listings
110lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
111inline false
112status 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
140The 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
147lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
148inline false
149status 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
172In 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
178To make a reference to an axis, we use axis_ref
179\end_layout
180
181\begin_layout Standard
182\begin_inset listings
183lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
184inline false
185status 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
208An 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
218To define a new axis inside a grid, we use the tag
219\series bold
220\color black
221axis.
222\end_layout
223
224\begin_layout Standard
225\begin_inset listings
226lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
227inline false
228status 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
251The 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
257unknown 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
267Advanced configuration
268\end_layout
269
270\begin_layout Standard
271Like 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
275LatexCommand ref
276reference "chap:Transformation"
277
278\end_inset
279
280 for more details.
281\end_layout
282
283\begin_layout Section
284Working with FORTRAN code
285\end_layout
286
287\begin_layout Standard
288Although 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
298Local axis index
299\end_layout
300
301\begin_layout Standard
302Axis 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
312placement !tbph
313wide false
314sideways false
315status 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
332Global axis data
333\end_layout
334
335\end_inset
336
337
338\begin_inset CommandInset label
339LatexCommand label
340name "globalAxis"
341
342\end_inset
343
344
345\end_layout
346
347\end_inset
348
349
350\end_layout
351
352\begin_layout Standard
353The local axis can be described by the following way.
354\end_layout
355
356\begin_layout Standard
357Specify the the beginning and size of local axis with:
358\end_layout
359
360\begin_layout Itemize
361n_glo: global size of axis.
362 
363\end_layout
364
365\begin_layout Itemize
366begin: global position where a local axis begin
367\end_layout
368
369\begin_layout Itemize
370n: local size of axis on each process
371\end_layout
372
373\begin_layout Standard
374For 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
380lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
381inline false
382status open
383
384\begin_layout Plain Layout
385
386CALL 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
395Local axis data
396\end_layout
397
398\begin_layout Standard
399Simpler 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
405Specify the beginning and size of data on the local axis:
406\end_layout
407
408\begin_layout Itemize
409data_begin: the local position of data on axis where data begins
410\end_layout
411
412\begin_layout Itemize
413data_n: size of data on each local axis
414\end_layout
415
416\begin_layout Standard
417Or specify data with its position in the local axis:
418\end_layout
419
420\begin_layout Itemize
421data_index: array of local position of data in the local axis.
422\end_layout
423
424\begin_layout Standard
425Although 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
432lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
433inline false
434status open
435
436\begin_layout Plain Layout
437
438CALL 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
447For 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
458Local data can be defined with:
459\end_layout
460
461\begin_layout Standard
462\begin_inset listings
463lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
464inline false
465status open
466
467\begin_layout Plain Layout
468
469CALL 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
478with
479\end_layout
480
481\begin_layout Itemize
482data = {-1,0,1,2,3}
483\end_layout
484
485\begin_layout Subsection
486Value
487\end_layout
488
489\begin_layout Standard
490Value 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
496lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
497inline false
498status open
499
500\begin_layout Plain Layout
501
502CALL 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
511with
512\end_layout
513
514\begin_layout Itemize
515valueAxis = {30, 40, 50}
516\end_layout
517
518\begin_layout Standard
519Because 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
525lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
526inline false
527status open
528
529\begin_layout Plain Layout
530
531CALL 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
540All 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
Note: See TracBrowser for help on using the repository browser.