source: XIOS/trunk/doc/inputs/user/Scalar.lyx @ 1205

Last change on this file since 1205 was 1084, checked in by mhnguyen, 7 years ago

Update user guide and reference guide

File size: 5.3 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
77Scalar
78\end_layout
79
80\begin_layout Standard
81Scalar, as its name, representing zero-dimension data, is a new element
82 in XIOS 2.0
83\end_layout
84
85\begin_layout Section
86Working with configuration file
87\end_layout
88
89\begin_layout Standard
90Scalar can be easily defined in the configuration file and in most case,
91 that should be enough.
92\end_layout
93
94\begin_layout Standard
95Scalar is defined inside its definition part with the tag
96\series bold
97\color black
98scalar_definition
99\series default
100\color inherit
101.
102 
103\begin_inset listings
104lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
105inline false
106status open
107
108\begin_layout Plain Layout
109
110<scalar_definition>
111\end_layout
112
113\begin_layout Plain Layout
114
115  <scalar id="scalar_A" />
116\end_layout
117
118\begin_layout Plain Layout
119
120  <axis scalar_ref="scalar_A" />
121\end_layout
122
123\begin_layout Plain Layout
124
125</scalar_definition>
126\end_layout
127
128\end_inset
129
130
131\end_layout
132
133\begin_layout Standard
134The first one is to specify explicitly identification of a scalar with an
135 id.
136 
137\end_layout
138
139\begin_layout Standard
140\begin_inset listings
141lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
142inline false
143status open
144
145\begin_layout Plain Layout
146
147<scalar_definition>
148\end_layout
149
150\begin_layout Plain Layout
151
152  <scalar id="scalar_A" /> 
153\end_layout
154
155\begin_layout Plain Layout
156
157</scalar_definition>
158\end_layout
159
160\end_inset
161
162
163\end_layout
164
165\begin_layout Standard
166In this way, with the id, the scalar can be processed, e.x modified its attribute
167s, with Fortran interface; besides, it is only possible to reference to
168 a scalar whose id is explicitly defined.
169\end_layout
170
171\begin_layout Standard
172To make a reference to a scalar, we use
173\shape italic
174scalar_ref
175\end_layout
176
177\begin_layout Standard
178\begin_inset listings
179lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
180inline false
181status open
182
183\begin_layout Plain Layout
184
185<scalar_definition>
186\end_layout
187
188\begin_layout Plain Layout
189
190  <scalar scalar_ref="scalar_A" />
191\end_layout
192
193\begin_layout Plain Layout
194
195</scalar_definition>
196\end_layout
197
198\end_inset
199
200
201\end_layout
202
203\begin_layout Standard
204A scalar defined by scalar_ref will inherit all attributes of the referenced
205 one, except its id attribute.
206 If there is no id specified, an implicit one is assigned to this new scalar.
207 The scalar with implicit id can only be used inside the scope where it
208 is defined, it can not be referenced, nor be processed.
209 It is useless to define an scalar without id inside scalar_definition.
210 
211\end_layout
212
213\begin_layout Standard
214To define a new scalar inside a grid, we use the tag
215\series bold
216\color black
217scalar.
218\end_layout
219
220\begin_layout Standard
221\begin_inset listings
222lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
223inline false
224status open
225
226\begin_layout Plain Layout
227
228<grid id="grid_A">          
229\end_layout
230
231\begin_layout Plain Layout
232
233   <scalar scalar_ref="scalar_A" />
234\end_layout
235
236\begin_layout Plain Layout
237
238</grid>
239\end_layout
240
241\end_inset
242
243
244\end_layout
245
246\begin_layout Standard
247The xml lines above can be translated as: the grid_A composed of an scalar_A
248 that is defined somewhere else before.
249 More precisely, the grid grid_A is constituted of an
250\begin_inset Quotes eld
251\end_inset
252
253unknown id
254\begin_inset Quotes erd
255\end_inset
256
257 scalar which has inherited all attributes (and their values) from scalar_A
258 (name, ...
259 etc).
260\end_layout
261
262\begin_layout Section
263Working with FORTRAN code
264\end_layout
265
266\begin_layout Standard
267All attributes of scalar can be found in Reference Guide.
268\end_layout
269
270\end_body
271\end_document
Note: See TracBrowser for help on using the repository browser.