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 | Transformation |
---|
78 | \end_layout |
---|
79 | |
---|
80 | \begin_layout Standard |
---|
81 | \begin_inset CommandInset label |
---|
82 | LatexCommand label |
---|
83 | name "chap:Transformation" |
---|
84 | |
---|
85 | \end_inset |
---|
86 | |
---|
87 | One of a new concept which differentiates XIOS 2.0 from its precedent is |
---|
88 | (spatial) transformation. |
---|
89 | In a simple case, zoom is considered to be a transformation. |
---|
90 | It can be more complicated geometric transformation such as inversion or |
---|
91 | interpolation. |
---|
92 | All transformations are taken place on grid level: it is necessary to define |
---|
93 | a grid source as well as a grid destination, and on this last one we define |
---|
94 | the transformations. |
---|
95 | |
---|
96 | \end_layout |
---|
97 | |
---|
98 | \begin_layout Section |
---|
99 | Define transformation |
---|
100 | \end_layout |
---|
101 | |
---|
102 | \begin_layout Standard |
---|
103 | Certainly, the first thing to do is define transformations if we would like |
---|
104 | to use them. |
---|
105 | \end_layout |
---|
106 | |
---|
107 | \begin_layout Standard |
---|
108 | It is not difficult to define a transformation: include a transformation |
---|
109 | inside grid element (domain, axis, scalar) definition, as the following |
---|
110 | \end_layout |
---|
111 | |
---|
112 | \begin_layout Standard |
---|
113 | \begin_inset listings |
---|
114 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
115 | inline false |
---|
116 | status open |
---|
117 | |
---|
118 | \begin_layout Plain Layout |
---|
119 | |
---|
120 | <domain_definition> |
---|
121 | \end_layout |
---|
122 | |
---|
123 | \begin_layout Plain Layout |
---|
124 | |
---|
125 | <domain id="domain_A_interpolated"> |
---|
126 | \end_layout |
---|
127 | |
---|
128 | \begin_layout Plain Layout |
---|
129 | |
---|
130 | <interpolated_domain/> |
---|
131 | \end_layout |
---|
132 | |
---|
133 | \begin_layout Plain Layout |
---|
134 | |
---|
135 | </domain> |
---|
136 | \end_layout |
---|
137 | |
---|
138 | \begin_layout Plain Layout |
---|
139 | |
---|
140 | </domain_definition> |
---|
141 | \end_layout |
---|
142 | |
---|
143 | \begin_layout Plain Layout |
---|
144 | |
---|
145 | <grid id="grid_A_interpolated"> |
---|
146 | \end_layout |
---|
147 | |
---|
148 | \begin_layout Plain Layout |
---|
149 | |
---|
150 | <domain domain_ref="domain_A_interpolated"/> |
---|
151 | \end_layout |
---|
152 | |
---|
153 | \begin_layout Plain Layout |
---|
154 | |
---|
155 | </grid> |
---|
156 | \end_layout |
---|
157 | |
---|
158 | \end_inset |
---|
159 | |
---|
160 | |
---|
161 | \end_layout |
---|
162 | |
---|
163 | \begin_layout Standard |
---|
164 | or simply, as below |
---|
165 | \end_layout |
---|
166 | |
---|
167 | \begin_layout Standard |
---|
168 | \begin_inset listings |
---|
169 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
170 | inline false |
---|
171 | status open |
---|
172 | |
---|
173 | \begin_layout Plain Layout |
---|
174 | |
---|
175 | <grid id="grid_A_interpolated"> |
---|
176 | \end_layout |
---|
177 | |
---|
178 | \begin_layout Plain Layout |
---|
179 | |
---|
180 | <domain id="domain_A_interpolated" > |
---|
181 | \end_layout |
---|
182 | |
---|
183 | \begin_layout Plain Layout |
---|
184 | |
---|
185 | <interpolated_domain/> |
---|
186 | \end_layout |
---|
187 | |
---|
188 | \begin_layout Plain Layout |
---|
189 | |
---|
190 | </domain> |
---|
191 | \end_layout |
---|
192 | |
---|
193 | \begin_layout Plain Layout |
---|
194 | |
---|
195 | </grid> |
---|
196 | \end_layout |
---|
197 | |
---|
198 | \end_inset |
---|
199 | |
---|
200 | |
---|
201 | \end_layout |
---|
202 | |
---|
203 | \begin_layout Standard |
---|
204 | These concrete examples say out a thing: a grid named grid_A_interpolated |
---|
205 | |
---|
206 | \series bold |
---|
207 | CAN BE |
---|
208 | \series default |
---|
209 | transformed with an interpolation on its domain. |
---|
210 | \end_layout |
---|
211 | |
---|
212 | \begin_layout Standard |
---|
213 | One obvious question: From which grid is the grid grid_A_interpolated interpolat |
---|
214 | ed? XIOS provides a flexible way to specify the grid source on the fly. |
---|
215 | \end_layout |
---|
216 | |
---|
217 | \begin_layout Section |
---|
218 | Activate transformation |
---|
219 | \end_layout |
---|
220 | |
---|
221 | \begin_layout Standard |
---|
222 | For taking effect, a transformation must be activated even though it is |
---|
223 | already defined. |
---|
224 | \end_layout |
---|
225 | |
---|
226 | \begin_layout Standard |
---|
227 | This activation can be done easily by establishing relation between the |
---|
228 | field source, which is on the grid source, and the field destination, which |
---|
229 | is on the grid destination (the grid will be transformed). |
---|
230 | \end_layout |
---|
231 | |
---|
232 | \begin_layout Standard |
---|
233 | Let grid_A is a grid source and it's defined as following |
---|
234 | \end_layout |
---|
235 | |
---|
236 | \begin_layout Standard |
---|
237 | \begin_inset listings |
---|
238 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
239 | inline false |
---|
240 | status open |
---|
241 | |
---|
242 | \begin_layout Plain Layout |
---|
243 | |
---|
244 | <grid id="grid_A"> |
---|
245 | \end_layout |
---|
246 | |
---|
247 | \begin_layout Plain Layout |
---|
248 | |
---|
249 | <domain id="domain_A" /> |
---|
250 | \end_layout |
---|
251 | |
---|
252 | \begin_layout Plain Layout |
---|
253 | |
---|
254 | </grid> |
---|
255 | \end_layout |
---|
256 | |
---|
257 | \end_inset |
---|
258 | |
---|
259 | |
---|
260 | \end_layout |
---|
261 | |
---|
262 | \begin_layout Standard |
---|
263 | Let field_A is a field on the grid_A |
---|
264 | \end_layout |
---|
265 | |
---|
266 | \begin_layout Standard |
---|
267 | \begin_inset listings |
---|
268 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
269 | inline false |
---|
270 | status open |
---|
271 | |
---|
272 | \begin_layout Plain Layout |
---|
273 | |
---|
274 | <field id="field_A" operation="average" freq_op="3600s" grid_ref="grid_A" |
---|
275 | /> |
---|
276 | \end_layout |
---|
277 | |
---|
278 | \end_inset |
---|
279 | |
---|
280 | |
---|
281 | \end_layout |
---|
282 | |
---|
283 | \begin_layout Standard |
---|
284 | and field_A_interpolated on the grid_A_interpolated |
---|
285 | \end_layout |
---|
286 | |
---|
287 | \begin_layout Standard |
---|
288 | \begin_inset listings |
---|
289 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
290 | inline false |
---|
291 | status open |
---|
292 | |
---|
293 | \begin_layout Plain Layout |
---|
294 | |
---|
295 | <field id="field_A_interpolated" operation="average" freq_op="3600s" grid_ref="g |
---|
296 | rid_A_interpolated" /> |
---|
297 | \end_layout |
---|
298 | |
---|
299 | \end_inset |
---|
300 | |
---|
301 | |
---|
302 | \end_layout |
---|
303 | |
---|
304 | \begin_layout Standard |
---|
305 | The transformation between two grids is activated by making a relation between |
---|
306 | the two fields on these grids with |
---|
307 | \series bold |
---|
308 | \shape italic |
---|
309 | field_ref |
---|
310 | \series default |
---|
311 | \shape default |
---|
312 | |
---|
313 | \end_layout |
---|
314 | |
---|
315 | \begin_layout Standard |
---|
316 | \begin_inset listings |
---|
317 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
318 | inline false |
---|
319 | status open |
---|
320 | |
---|
321 | \begin_layout Plain Layout |
---|
322 | |
---|
323 | <field id="field_A_interpolated" operation="average" freq_op="3600s" grid_ref="g |
---|
324 | rid_A_interpolated" field_ref="field_A" /> |
---|
325 | \end_layout |
---|
326 | |
---|
327 | \end_inset |
---|
328 | |
---|
329 | |
---|
330 | \end_layout |
---|
331 | |
---|
332 | \begin_layout Section |
---|
333 | Working with FORTRAN |
---|
334 | \end_layout |
---|
335 | |
---|
336 | \begin_layout Standard |
---|
337 | Like other objects in XIOS, a transformation can be identified with an id |
---|
338 | which allows users to process its attributes via FORTRAN interface. |
---|
339 | \end_layout |
---|
340 | |
---|
341 | \begin_layout Standard |
---|
342 | \begin_inset listings |
---|
343 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
344 | inline false |
---|
345 | status open |
---|
346 | |
---|
347 | \begin_layout Plain Layout |
---|
348 | |
---|
349 | <grid id="grid_A_interpolated"> |
---|
350 | \end_layout |
---|
351 | |
---|
352 | \begin_layout Plain Layout |
---|
353 | |
---|
354 | <domain id="domain_A_intepolated" > |
---|
355 | \end_layout |
---|
356 | |
---|
357 | \begin_layout Plain Layout |
---|
358 | |
---|
359 | <interpolated_domain id="interp_domain" /> |
---|
360 | \end_layout |
---|
361 | |
---|
362 | \begin_layout Plain Layout |
---|
363 | |
---|
364 | </domain> |
---|
365 | \end_layout |
---|
366 | |
---|
367 | \begin_layout Plain Layout |
---|
368 | |
---|
369 | </grid> |
---|
370 | \end_layout |
---|
371 | |
---|
372 | \end_inset |
---|
373 | |
---|
374 | |
---|
375 | \end_layout |
---|
376 | |
---|
377 | \begin_layout Standard |
---|
378 | All transformation and their attributes can be found in Reference Guide. |
---|
379 | \end_layout |
---|
380 | |
---|
381 | \begin_layout Section |
---|
382 | Examples |
---|
383 | \end_layout |
---|
384 | |
---|
385 | \begin_layout Standard |
---|
386 | Example of some common transformations in XIOS. |
---|
387 | \end_layout |
---|
388 | |
---|
389 | \begin_layout Subsection |
---|
390 | Zoom |
---|
391 | \end_layout |
---|
392 | |
---|
393 | \begin_layout Standard |
---|
394 | Zoom is available for domain and axis |
---|
395 | \end_layout |
---|
396 | |
---|
397 | \begin_layout Standard |
---|
398 | Define a grid source |
---|
399 | \end_layout |
---|
400 | |
---|
401 | \begin_layout Standard |
---|
402 | \begin_inset listings |
---|
403 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
404 | inline false |
---|
405 | status open |
---|
406 | |
---|
407 | \begin_layout Plain Layout |
---|
408 | |
---|
409 | <grid id="grid_A"> |
---|
410 | \end_layout |
---|
411 | |
---|
412 | \begin_layout Plain Layout |
---|
413 | |
---|
414 | <domain id="domain_A" /> |
---|
415 | \end_layout |
---|
416 | |
---|
417 | \begin_layout Plain Layout |
---|
418 | |
---|
419 | <axis id="axis_A" /> |
---|
420 | \end_layout |
---|
421 | |
---|
422 | \begin_layout Plain Layout |
---|
423 | |
---|
424 | </grid> |
---|
425 | \end_layout |
---|
426 | |
---|
427 | \end_inset |
---|
428 | |
---|
429 | |
---|
430 | \end_layout |
---|
431 | |
---|
432 | \begin_layout Standard |
---|
433 | Define a grid destination |
---|
434 | \end_layout |
---|
435 | |
---|
436 | \begin_layout Standard |
---|
437 | \begin_inset listings |
---|
438 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
439 | inline false |
---|
440 | status open |
---|
441 | |
---|
442 | \begin_layout Plain Layout |
---|
443 | |
---|
444 | <grid id="grid_A_zoom"> |
---|
445 | \end_layout |
---|
446 | |
---|
447 | \begin_layout Plain Layout |
---|
448 | |
---|
449 | <domain id="domain_A_zoom" domain_ref="domain_A" > |
---|
450 | \end_layout |
---|
451 | |
---|
452 | \begin_layout Plain Layout |
---|
453 | |
---|
454 | <zoom_domain ibegin="0" ni="10" jbegin="0" nj="10" /> |
---|
455 | \end_layout |
---|
456 | |
---|
457 | \begin_layout Plain Layout |
---|
458 | |
---|
459 | </domain> |
---|
460 | \end_layout |
---|
461 | |
---|
462 | \begin_layout Plain Layout |
---|
463 | |
---|
464 | <axis id="axis_A_zoom" axis_ref="axis_A"> |
---|
465 | \end_layout |
---|
466 | |
---|
467 | \begin_layout Plain Layout |
---|
468 | |
---|
469 | <zoom_axis begin="0" n="10"/> |
---|
470 | \end_layout |
---|
471 | |
---|
472 | \begin_layout Plain Layout |
---|
473 | |
---|
474 | </axis> |
---|
475 | \end_layout |
---|
476 | |
---|
477 | \begin_layout Plain Layout |
---|
478 | |
---|
479 | </grid> |
---|
480 | \end_layout |
---|
481 | |
---|
482 | \end_inset |
---|
483 | |
---|
484 | |
---|
485 | \end_layout |
---|
486 | |
---|
487 | \begin_layout Standard |
---|
488 | Activate zoom |
---|
489 | \end_layout |
---|
490 | |
---|
491 | \begin_layout Standard |
---|
492 | \begin_inset listings |
---|
493 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
494 | inline false |
---|
495 | status open |
---|
496 | |
---|
497 | \begin_layout Plain Layout |
---|
498 | |
---|
499 | <field id="field_A" operation="average" freq_op="3600s" grid_ref="grid_A" |
---|
500 | /> |
---|
501 | \end_layout |
---|
502 | |
---|
503 | \begin_layout Plain Layout |
---|
504 | |
---|
505 | <field id="field_A_zoom" grid_ref="grid_A_zoom" field_ref="field_A" /> |
---|
506 | \end_layout |
---|
507 | |
---|
508 | \end_inset |
---|
509 | |
---|
510 | |
---|
511 | \end_layout |
---|
512 | |
---|
513 | \begin_layout Standard |
---|
514 | Transformation are done with the order of their definition. |
---|
515 | In the above example, the domain is zoomed first then the zoom on axis |
---|
516 | is applied. |
---|
517 | \end_layout |
---|
518 | |
---|
519 | \begin_layout Subsection |
---|
520 | Interpolation |
---|
521 | \end_layout |
---|
522 | |
---|
523 | \begin_layout Standard |
---|
524 | Interpolation is available for domain and axis |
---|
525 | \end_layout |
---|
526 | |
---|
527 | \begin_layout Standard |
---|
528 | Define a grid source |
---|
529 | \end_layout |
---|
530 | |
---|
531 | \begin_layout Standard |
---|
532 | \begin_inset listings |
---|
533 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
534 | inline false |
---|
535 | status open |
---|
536 | |
---|
537 | \begin_layout Plain Layout |
---|
538 | |
---|
539 | <grid id="grid_A"> |
---|
540 | \end_layout |
---|
541 | |
---|
542 | \begin_layout Plain Layout |
---|
543 | |
---|
544 | <domain id="domain_A" /> |
---|
545 | \end_layout |
---|
546 | |
---|
547 | \begin_layout Plain Layout |
---|
548 | |
---|
549 | <axis id="axis_A" /> |
---|
550 | \end_layout |
---|
551 | |
---|
552 | \begin_layout Plain Layout |
---|
553 | |
---|
554 | </grid> |
---|
555 | \end_layout |
---|
556 | |
---|
557 | \end_inset |
---|
558 | |
---|
559 | |
---|
560 | \end_layout |
---|
561 | |
---|
562 | \begin_layout Standard |
---|
563 | Define a grid destination |
---|
564 | \end_layout |
---|
565 | |
---|
566 | \begin_layout Standard |
---|
567 | \begin_inset listings |
---|
568 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
569 | inline false |
---|
570 | status open |
---|
571 | |
---|
572 | \begin_layout Plain Layout |
---|
573 | |
---|
574 | <grid id="grid_A_interpolated"> |
---|
575 | \end_layout |
---|
576 | |
---|
577 | \begin_layout Plain Layout |
---|
578 | |
---|
579 | <domain id="domain_A_interpolated" > |
---|
580 | \end_layout |
---|
581 | |
---|
582 | \begin_layout Plain Layout |
---|
583 | |
---|
584 | <interpolate_domain/> |
---|
585 | \end_layout |
---|
586 | |
---|
587 | \begin_layout Plain Layout |
---|
588 | |
---|
589 | <zoom_domain ibegin="0" ni="10" jbegin="0" nj="10" /> |
---|
590 | \end_layout |
---|
591 | |
---|
592 | \begin_layout Plain Layout |
---|
593 | |
---|
594 | </domain> |
---|
595 | \end_layout |
---|
596 | |
---|
597 | \begin_layout Plain Layout |
---|
598 | |
---|
599 | <axis id="axis_A" /> |
---|
600 | \end_layout |
---|
601 | |
---|
602 | \begin_layout Plain Layout |
---|
603 | |
---|
604 | </grid> |
---|
605 | \end_layout |
---|
606 | |
---|
607 | \end_inset |
---|
608 | |
---|
609 | |
---|
610 | \end_layout |
---|
611 | |
---|
612 | \begin_layout Standard |
---|
613 | Activate transformations |
---|
614 | \end_layout |
---|
615 | |
---|
616 | \begin_layout Standard |
---|
617 | \begin_inset listings |
---|
618 | lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" |
---|
619 | inline false |
---|
620 | status open |
---|
621 | |
---|
622 | \begin_layout Plain Layout |
---|
623 | |
---|
624 | <field id="field_A" operation="average" freq_op="3600s" grid_ref="grid_A" |
---|
625 | /> |
---|
626 | \end_layout |
---|
627 | |
---|
628 | \begin_layout Plain Layout |
---|
629 | |
---|
630 | <field id="field_A_interpolated" grid_ref="grid_A_interpolated" field_ref="field |
---|
631 | _A" /> |
---|
632 | \end_layout |
---|
633 | |
---|
634 | \end_inset |
---|
635 | |
---|
636 | |
---|
637 | \end_layout |
---|
638 | |
---|
639 | \begin_layout Standard |
---|
640 | Sequence of transformation can be defined in a grid. |
---|
641 | In the above example, the domain_A is interpolated into domain_A_interpolated |
---|
642 | on which a zoom is then applied. |
---|
643 | \end_layout |
---|
644 | |
---|
645 | \end_body |
---|
646 | \end_document |
---|