source: XIOS/trunk/doc/inputs/user/Domain.lyx @ 821

Last change on this file since 821 was 821, checked in by mhnguyen, 8 years ago

Making some improvements of transformation algorithm

+) Correct the way to enlisting transformations in an element (domain, axis)
+) Optimize generic transformation to make sure temporary grid to be created on demand
+) Update some mpi tag to prevent conflict
+) Correct some minor stuffs
+) Update documents

Test
+) On Curie
+) all test pass

File size: 24.1 KB
Line 
1#LyX 2.1 created this file. For more info see http://www.lyx.org/
2\lyxformat 474
3\begin_document
4\begin_header
5\textclass book
6\use_default_options true
7\master ../../XIOS_user_guide.lyx
8\maintain_unincluded_children false
9\language english
10\language_package default
11\inputencoding auto
12\fontencoding global
13\font_roman default
14\font_sans default
15\font_typewriter default
16\font_math auto
17\font_default_family default
18\use_non_tex_fonts false
19\font_sc false
20\font_osf false
21\font_sf_scale 100
22\font_tt_scale 100
23\graphics default
24\default_output_format default
25\output_sync 0
26\bibtex_command default
27\index_command default
28\float_placement !tph
29\paperfontsize default
30\spacing single
31\use_hyperref false
32\papersize a4paper
33\use_geometry false
34\use_package amsmath 1
35\use_package amssymb 1
36\use_package cancel 1
37\use_package esint 1
38\use_package mathdots 1
39\use_package mathtools 1
40\use_package mhchem 1
41\use_package stackrel 1
42\use_package stmaryrd 1
43\use_package undertilde 1
44\cite_engine basic
45\cite_engine_type default
46\biblio_style plain
47\use_bibtopic false
48\use_indices false
49\paperorientation portrait
50\suppress_date false
51\justification true
52\use_refstyle 1
53\index Index
54\shortcut idx
55\color #008000
56\end_index
57\secnumdepth 3
58\tocdepth 3
59\paragraph_separation indent
60\paragraph_indentation default
61\quotes_language english
62\papercolumns 1
63\papersides 1
64\paperpagestyle default
65\tracking_changes false
66\output_changes false
67\html_math_output 0
68\html_css_as_file 0
69\html_be_strict false
70\end_header
71
72\begin_body
73
74\begin_layout Chapter
75Domain
76\end_layout
77
78\begin_layout Standard
79Domain is a two dimensional coordinates, which can be considered to be composed
80 of two axis: y-axis and x-axis.
81 However, different from two axis composed mechanically, a domain contains
82 more typical information which play an important role in specific cases.
83 Very often, in meteorological applications, domain represents a surface
84 with latitude and longitude.
85\end_layout
86
87\begin_layout Section
88Working with configuration file
89\end_layout
90
91\begin_layout Subsection
92Basic configuration
93\end_layout
94
95\begin_layout Standard
96Similar to Grid as well as other components in XIOS, a domain is defined
97 inside its definition part with the tag
98\series bold
99\color black
100domain_definition
101\series default
102\color inherit
103.
104 
105\begin_inset listings
106lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
107inline false
108status open
109
110\begin_layout Plain Layout
111
112<domain_definition>
113\end_layout
114
115\begin_layout Plain Layout
116
117  <domain id="domain_A" />
118\end_layout
119
120\begin_layout Plain Layout
121
122  <domain domain_ref="domain_A" />
123\end_layout
124
125\begin_layout Plain Layout
126
127</domain_definition>
128\end_layout
129
130\end_inset
131
132
133\end_layout
134
135\begin_layout Standard
136The first one is to specify explicitly identification of a domain with an
137 id.
138 One repetition, id of any component in XIOS are
139\shape italic
140\color black
141unique
142\shape default
143\color inherit
144 among this kind of components.
145 It is not allowed to have two domains with a same id, but it is permitted
146 a domain and a grid, for example, to share a same one.
147\end_layout
148
149\begin_layout Standard
150\begin_inset listings
151lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
152inline false
153status open
154
155\begin_layout Plain Layout
156
157<domain_definition>
158\end_layout
159
160\begin_layout Plain Layout
161
162  <domain id="domain_A" /> 
163\end_layout
164
165\begin_layout Plain Layout
166
167</domain_definition>
168\end_layout
169
170\end_inset
171
172
173\end_layout
174
175\begin_layout Standard
176In this way, with id, the domain can be processed, e.x modified its attributes,
177 with Fortran interface; besides, it is only possible to reference to a
178 domain whose id is explicitly defined.
179\end_layout
180
181\begin_layout Standard
182Very often, after a domain is defined, it may be referenced many times.
183 To make a reference to a domain, we use domain_ref
184\end_layout
185
186\begin_layout Standard
187\begin_inset listings
188lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
189inline false
190status open
191
192\begin_layout Plain Layout
193
194<domain_definition>
195\end_layout
196
197\begin_layout Plain Layout
198
199  <domain domain_ref="domain_A" />
200\end_layout
201
202\begin_layout Plain Layout
203
204</domain_definition>
205\end_layout
206
207\end_inset
208
209
210\end_layout
211
212\begin_layout Standard
213A domain defined by domain_ref will inherit all attributes of the referenced
214 one, except its id attribute.
215 If there is no id specified, an implicit one is assigned to this new domain.
216 The domain with implicit id can only be used inside the scope where it
217 is defined, it can not be referenced, nor be processed.
218 It is rare to define a domain without id inside domain_definition.
219 However, the domain_ref is utilized widely outside the scope of domain_definiti
220on.
221\end_layout
222
223\begin_layout Standard
224Because a domain is a sub component of grid, it is possible to define a
225 new domain inside a grid with the tag
226\series bold
227\color black
228domain.
229 
230\series default
231\color inherit
232Moreover it is the only region where we can define a new domain outside
233 domain_definition.
234\end_layout
235
236\begin_layout Standard
237\begin_inset listings
238lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
239inline false
240status 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 domain_ref="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
263The xml lines above can be translated as: the grid_A composed of a domain_A
264 that is defined somewhere else before.
265 More precisely, the grid grid_A is constituted of a
266\begin_inset Quotes eld
267\end_inset
268
269unknown id
270\begin_inset Quotes erd
271\end_inset
272
273 domain which has inherited all attributes (and their values) from domain
274 A (name, long name, i_index, j_index, ...
275 etc).
276\end_layout
277
278\begin_layout Standard
279With this approach, we only define a domain once but reuse it as many time
280 as we like in different configurations.
281\end_layout
282
283\begin_layout Subsection
284Advanced configuration
285\end_layout
286
287\begin_layout Standard
288One of a new concept which differenciates XIOS 2.0 from its precedent is
289 transformation.
290 In a simple case, zoom feature is now considered to be a transformation.
291 It can be more complicated for other geometric transformation such as inversion
292 or interpolation.
293 All transformation are taken place on grid level.
294 It means that it is neccessary to define a grid source and a grid destination
295 as well as a transformation or list of transformation which we'd like to
296 have.
297 In order to transform a grid to one another, we need to specify a transformatio
298n on its sub-component: domain or axis.
299\end_layout
300
301\begin_layout Standard
302Because transformation on a domain is different from one on an axis, we
303 differenciate two categories of transformation: transformation_domain and
304 transformation_axis.
305\end_layout
306
307\begin_layout Standard
308Till now, XIOS supports the following transformation on domain:
309\end_layout
310
311\begin_layout Itemize
312zoom_domain: Like zoom functionality in XIOS 1.0, the destination grid is
313 the zoomed region of the source grid.
314\end_layout
315
316\begin_layout Itemize
317interpolation_domain: Implement interpolation from a domain to one another,
318 for now XIOS can only do interpolation by reading calculated weight values
319 from a file or calculate the weights on the fly.
320\end_layout
321
322\begin_layout Itemize
323generate_rectilinear_domain: auto generating, distributing a rectilinear
324 domain then filling all mandatory attributes.
325\end_layout
326
327\begin_layout Standard
328It is not difficult to define a transformation: Include type of transformation
329 inside domain definition, as the following
330\end_layout
331
332\begin_layout Standard
333\begin_inset listings
334lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
335inline false
336status open
337
338\begin_layout Plain Layout
339
340<domain_definition>
341\end_layout
342
343\begin_layout Plain Layout
344
345  <domain id="domain_A" />
346\end_layout
347
348\begin_layout Plain Layout
349
350  <domain id="domain_A_zoom" domain_ref="domain_A">
351\end_layout
352
353\begin_layout Plain Layout
354
355   <zoom_domain zoom_ibegin="1" zoom_ni="3" zoom_jbegin="0" zoom_nj="2"/>
356\end_layout
357
358\begin_layout Plain Layout
359
360  </domain>
361\end_layout
362
363\begin_layout Plain Layout
364
365</domain_definition>
366\end_layout
367
368\end_inset
369
370
371\end_layout
372
373\begin_layout Standard
374The concrete example above tells many things: a domain named domain_A_zoom
375 is transformed from domain name domain_A with a zoom activity.
376 The domain_A_zoom is the zoomed region of domain_A.
377 The detailed attributes of zoom_domain can be found in reference document,
378 but simply it contains the begining and size of zoomed region.
379\end_layout
380
381\begin_layout Standard
382One remark is the transformed domain SHOULD have an id, in this case, it's
383 domain_A_zoom.
384 As mentioned before, a no-id domain or any no-id component of XIOS can
385 only be used inside its definition scope.
386 It exists but is useless.
387 So care about that.
388\end_layout
389
390\begin_layout Standard
391To make use of transformation, the grid must contain domains which reference
392 to transformed ones.
393 
394\end_layout
395
396\begin_layout Standard
397\begin_inset listings
398lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
399inline false
400status open
401
402\begin_layout Plain Layout
403
404<grid id="grid_A">          
405\end_layout
406
407\begin_layout Plain Layout
408
409   <domain domain_ref="domain_A" />
410\end_layout
411
412\begin_layout Plain Layout
413
414 </grid>
415\end_layout
416
417\begin_layout Plain Layout
418
419<grid id="grid_A_zoom">          
420\end_layout
421
422\begin_layout Plain Layout
423
424   <domain domain_ref="domain_A_zoom" />
425\end_layout
426
427\begin_layout Plain Layout
428
429 </grid>
430\end_layout
431
432\end_inset
433
434
435\end_layout
436
437\begin_layout Standard
438On defining this way, we tell XIOS to establish a connection between two
439 grids by a transformation (zoom) with: grid source - grid_A, grid destination
440 - grid_A_zoom.
441\end_layout
442
443\begin_layout Standard
444As mentioned in Grid Chapter, in order to use transformed grid, just reference
445 to it in field_definition
446\end_layout
447
448\begin_layout Standard
449\begin_inset listings
450lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
451inline false
452status open
453
454\begin_layout Plain Layout
455
456<field_definition level="1" enabled=".TRUE." default_value="9.96921e+36">
457\end_layout
458
459\begin_layout Plain Layout
460
461  <field id="field_A"  operation="average" freq_op="3600s" grid_ref="grid_A"
462 />
463\end_layout
464
465\begin_layout Plain Layout
466
467  <field id="field_A_zoom"  operation="average" freq_op="3600s" grid_ref="grid_A
468_zoom" />
469\end_layout
470
471\begin_layout Plain Layout
472
473 </field_definition>
474\end_layout
475
476\end_inset
477
478
479\end_layout
480
481\begin_layout Standard
482Although xml is helpful to define several configurations, it is not convenient
483 to customize attributes of domain.
484 So it's the turn of Fortran interface.
485\end_layout
486
487\begin_layout Section
488Working with FORTRAN code
489\end_layout
490
491\begin_layout Standard
492One of the important concepts to grasp in mind in using FORTRAN interface
493 is the data distribution.
494 With a distributed-memory XIOS, data are broken into disjoint blocks, one
495 per client process.
496 In the next sections, local describes everything related to a client process,
497 whereas global means global data.
498 The followings describe the essential parts of domain.
499 Details of its attributes and operations can be found in XIOS reference
500 guide
501\end_layout
502
503\begin_layout Subsection
504Domain type
505\end_layout
506
507\begin_layout Standard
508Domain is a two dimensional coordinates, which can be considered to be composed
509 of two axis: y-axis and x-axis.
510 However, different from two axis composed mechanically, a domain contains
511 more typical information which play an important role in specific cases.
512 Very often, in meteorological applications, domain represents a surface
513 with latitude and longitude.
514 Because these properties change from one domain type to another, it is
515 recommended to use domain in case of representing a surface.
516\end_layout
517
518\begin_layout Standard
519In XIOS, a domain can be represented by one of three different types of
520 coordinate system which also differentiate the way to represent latitude
521 and longitude correspondingly.
522 
523\end_layout
524
525\begin_layout Itemize
526rectilinear: a simple 2-dimensional Cartesian coordinates with two perpendicular
527 axes.
528 Latitude represents the y-axe while longitude represents the x-axe.
529\end_layout
530
531\begin_layout Itemize
532curvilinear: a 2-dimensional coordinates allows the generality of two axes
533 not perpendicular to each other.
534 Latitude and longitude have the size equivalent to size of local domain.
535 
536\end_layout
537
538\begin_layout Itemize
539unstructured: not any of two above, the latitutude and longitude, as curvilinear
540, are reprensented with the help of boundaries.
541 
542\end_layout
543
544\begin_layout Standard
545Different from XIOS 1.0, in this new version, users must explicitly specify
546 the type of domain which they would like to use
547\end_layout
548
549\begin_layout Standard
550\begin_inset listings
551lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
552inline false
553status open
554
555\begin_layout Plain Layout
556
557CALL xios_set_domain_attr("domain_A",type='rectilinear')
558\end_layout
559
560\end_inset
561
562
563\end_layout
564
565\begin_layout Standard
566Althoug there are different domain types, they share the similar patterns
567 to settle local data on a client process: There are some essential attributes
568 to define.
569 The next sections describe their meanings and how to specify correctly
570 data for a local domain.
571\end_layout
572
573\begin_layout Subsection
574Local domain index
575\end_layout
576
577\begin_layout Standard
578It is not uncommon that a global domain is broken into several pieces, each
579 of which is distributed to one process.
580 Following we consider a simple case: a domain of rectilinear type with
581 global size 9 x 9 and its data is distributed evenly among 9 client processes,
582 each of which has 3x3.
583\end_layout
584
585\begin_layout Standard
586\begin_inset Float figure
587placement !tbph
588wide false
589sideways false
590status open
591
592\begin_layout Plain Layout
593\begin_inset Graphics
594        filename ../images/Distributed_Domain.pdf
595        lyxscale 50
596        scale 60
597
598\end_inset
599
600
601\end_layout
602
603\begin_layout Plain Layout
604\begin_inset Caption Standard
605
606\begin_layout Plain Layout
607Global domain data
608\end_layout
609
610\end_inset
611
612
613\begin_inset CommandInset label
614LatexCommand label
615name "globalDomain"
616
617\end_inset
618
619
620\end_layout
621
622\end_inset
623
624
625\end_layout
626
627\begin_layout Standard
628The region of local domain can be described by one of the following way.
629\end_layout
630
631\begin_layout Standard
632Specify the the beginning and size of local domain with:
633\end_layout
634
635\begin_layout Itemize
636ni_glo, nj_glo: global size of x-axis and y-axis correspondingly.
637 
638\end_layout
639
640\begin_layout Itemize
641ibegin, jbegin: global position on x-axis and y-axis where a local domain
642 begin
643\end_layout
644
645\begin_layout Itemize
646ni, nj: local size of domain of each process on x-axis and y-axis
647\end_layout
648
649\begin_layout Standard
650Or tell XIOS exactly the global position of each point in the local domain,
651 from left to right, top to bottom with:
652\end_layout
653
654\begin_layout Itemize
655i_index, j_index: array of global position of every point in the local domain.
656 It is very useful when local domains do not align with each other.
657\end_layout
658
659\begin_layout Standard
660For example, with the first method, the local domain in the middle (the
661 blue one) can be specified with:
662\end_layout
663
664\begin_layout Standard
665\begin_inset listings
666lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
667inline false
668status open
669
670\begin_layout Plain Layout
671
672CALL xios_set_domain_attr("domain_A",ni_glo=9, nj_glo=9, ibegin=3, ni=3,
673 jbegin=3, nj=3)
674\end_layout
675
676\end_inset
677
678
679\end_layout
680
681\begin_layout Standard
682The second method demands only two arrays:
683\end_layout
684
685\begin_layout Standard
686\begin_inset listings
687lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
688inline false
689status open
690
691\begin_layout Plain Layout
692
693CALL xios_set_domain_attr("domain_A",ni_glo=9, nj_glo=9, i_index=iIndex,
694 j_index=jIndex)
695\end_layout
696
697\end_inset
698
699
700\end_layout
701
702\begin_layout Standard
703and
704\end_layout
705
706\begin_layout Itemize
707iIndex={3,4,5,3,4,5,3,4,5}, jIndex = {3,3,3,4,4,4,5,5,5}
708\end_layout
709
710\begin_layout Subsection
711Local domain data
712\end_layout
713
714\begin_layout Standard
715Similar to define local index, local data can be done in two ways.
716\end_layout
717
718\begin_layout Standard
719Specify the begining and size of data on the local domain:
720\end_layout
721
722\begin_layout Itemize
723data_ibegin, data_jbegin: the local position of data on x-axis and y-axis
724 where data begins
725\end_layout
726
727\begin_layout Itemize
728data_ni, data_nj: size of data on each axis
729\end_layout
730
731\begin_layout Standard
732Or specify data with its position in the local domain, from left to right,
733 top to bottom with
734\end_layout
735
736\begin_layout Itemize
737data_i_index, data_j_index: array of local position of data in the local
738 domain.
739\end_layout
740
741\begin_layout Standard
742Beside the attributes above, one of the essential attributes to define is
743 dimensional size of data - data_dim.
744 Although domain has two dimensions, data are not required to be 2-dimensional.
745 In particular, for case of data_dim == 1, XIOS uses an
746\shape italic
7471-dimensional block distribution
748\shape default
749 of data, distributed along the first dimension, the x-axis.
750\end_layout
751
752\begin_layout Standard
753With the first way to define data on a local domain, we can use:
754\end_layout
755
756\begin_layout Standard
757\begin_inset listings
758lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
759inline false
760status open
761
762\begin_layout Plain Layout
763
764CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2,
765 data_jbegin=-1, data_nj=nj+2)
766\end_layout
767
768\end_inset
769
770
771\end_layout
772
773\begin_layout Standard
774In order to be processed correctly, data must be specified with the begining
775 and size of its block .
776 For two-dimensional data, it can be done with data_ibegin, data_ni for
777 the first dimension and data_jbegin, data_nj for the second dimension.
778 In case of one-dimensional data, it is only necessary to determine data_ibegin
779 and data_ni.
780 Although the valid data must be inside a local domain, it is not neccessary
781 for data to have same size as local domain.
782 In fact, data can have larger size than domain on each dimension, this
783 is often the case of
784\begin_inset Quotes eld
785\end_inset
786
787ghost cell
788\begin_inset Quotes erd
789\end_inset
790
791.
792 The attributes data_ibegin and data_jbegin specify the offset of data from
793 local domain.
794 For local domain_A, the negative value indicates that data is larger than
795 local domain, the valid part of data needs extracted from the real data.
796 A positive value indicates data is smaller than local domain.
797 The default value of data_ibegin/data_jbegin is 0, which implies that data
798 fit into local domain properly.
799 
800\end_layout
801
802\begin_layout Standard
803\begin_inset Float figure
804placement !tbph
805wide false
806sideways false
807status open
808
809\begin_layout Plain Layout
810\begin_inset Graphics
811        filename ../images/Domain.pdf
812        lyxscale 50
813        scale 60
814
815\end_inset
816
817
818\end_layout
819
820\begin_layout Plain Layout
821\begin_inset Caption Standard
822
823\begin_layout Plain Layout
824Local domain with data
825\end_layout
826
827\end_inset
828
829
830\begin_inset CommandInset label
831LatexCommand label
832name "localDomain"
833
834\end_inset
835
836
837\end_layout
838
839\end_inset
840
841
842\end_layout
843
844\begin_layout Standard
845On Figure
846\begin_inset CommandInset ref
847LatexCommand ref
848reference "localDomain"
849
850\end_inset
851
852, local domain occupies the center of the global domain, where real data
853 fill up a larger region.
854 Only data inside the local domain, represented by blue cells, are valid.
855 
856\end_layout
857
858\begin_layout Standard
859With the secon way, data can be represented with:
860\end_layout
861
862\begin_layout Standard
863\begin_inset listings
864lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
865inline false
866status open
867
868\begin_layout Plain Layout
869
870CALL xios_set_domain_attr("domain_A",data_dim=2, data_i_index=dataI, data_j_inde
871x=dataJ)
872\end_layout
873
874\end_inset
875
876
877\end_layout
878
879\begin_layout Standard
880with
881\end_layout
882
883\begin_layout Itemize
884dataJ = {-1,-1,-1,-1,-1,0,0,0,0,0,1,1,1,1,1,2,2,2,3,3,3,3,3}
885\end_layout
886
887\begin_layout Itemize
888dataI = {-1,0,1,2,3,-1,0,1,2,3,-1,0,1,2,3,-1,0,1,2,3,-1,0,1,2,3}
889\end_layout
890
891\begin_layout Standard
892As mentioned, data on a domain are two-dimensional but in some cases, there
893 is a need to write data continously, there comes one-dimensional data.
894 With the precedent example, we can define one dimensional data with:
895\end_layout
896
897\begin_layout Standard
898\begin_inset listings
899lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
900inline false
901status open
902
903\begin_layout Plain Layout
904
905CALL xios_set_domain_attr("domain_A",data_dim=1, data_i_index=dataI)
906\end_layout
907
908\end_inset
909
910
911\end_layout
912
913\begin_layout Standard
914and
915\end_layout
916
917\begin_layout Itemize
918dataI = {-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18}
919\end_layout
920
921\begin_layout Standard
922Above are the mandatory attributes to define local domain.
923 There are some auxilliary attributes which make data meaningful, especially
924 for meteorological one.
925 The next section disscuses these attributes.
926\end_layout
927
928\begin_layout Subsection
929Longitude and latitude
930\end_layout
931
932\begin_layout Standard
933Different from the previous version, in XIOS 2.0, lonngitude and latitude
934 are optional.
935 Moreover, to be coherent to the data_dim concept, there are more ways to
936 input longitude and latitude values.
937\end_layout
938
939\begin_layout Standard
940Like data, longitude and latitude values can be one or two dimension.
941 The first ones are represented with lonvalue_1d, latvalue_1d; the second
942 ones are specified with lonvalue_2d and latvalue_2d.
943\end_layout
944
945\begin_layout Standard
946With the same domain_A, we can set longitude and latitude values by calling:
947\end_layout
948
949\begin_layout Standard
950\begin_inset listings
951lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
952inline false
953status open
954
955\begin_layout Plain Layout
956
957CALL xios_set_domain_attr("domain_A",lonvalue_1d=lon1D, latvalue_1d=lat1D)
958\end_layout
959
960\end_inset
961
962
963\end_layout
964
965\begin_layout Standard
966with
967\end_layout
968
969\begin_layout Itemize
970lon1D = {30, 40, 50, 30, 40, 50, 30, 40, 50}
971\end_layout
972
973\begin_layout Itemize
974lat1D = {30, 30, 30, 40, 40, 40, 50, 50, 50}
975\end_layout
976
977\begin_layout Standard
978Or by using two-dimension longitude and latitude
979\end_layout
980
981\begin_layout Standard
982\begin_inset listings
983lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
984inline false
985status open
986
987\begin_layout Plain Layout
988
989CALL xios_set_domain_attr("domain_A",lonvalue_2d=lon2D, latvalue_1d=lat2D)
990\end_layout
991
992\end_inset
993
994
995\end_layout
996
997\begin_layout Standard
998with
999\end_layout
1000
1001\begin_layout Itemize
1002lon2D = {
1003\begin_inset Formula $\begin{array}{ccc}
100430 & 40 & 50\\
100530 & 40 & 50\\
100630 & 40 & 50
1007\end{array}$
1008\end_inset
1009
1010}
1011\end_layout
1012
1013\begin_layout Itemize
1014lat1D = {
1015\begin_inset Formula $\begin{array}{ccc}
101630 & 30 & 30\\
101740 & 40 & 40\\
101850 & 50 & 50
1019\end{array}$
1020\end_inset
1021
1022}
1023\end_layout
1024
1025\begin_layout Standard
1026For unstructured mesh, a cell can have different number of vertices than
1027 rectinlinear, in this case, longitude and latitude value of the vertex
1028 of cell are specified with bounds_lon_1d and bounds_lat_1d.
1029\end_layout
1030
1031\begin_layout Standard
1032For curvilinear mesh, bounds_lon_2d and bounds_lat_2d provide a convenient
1033 way to define longitude and latitude value for the vertex of the cell.
1034 However, it is possible to use bounds_lon_1d and bounds_lat_1d to describe
1035 these values.
1036\end_layout
1037
1038\begin_layout Standard
1039One thing to remind, only *_1d or *_2d attributes are used, if *_1d and
1040 *_2d of a same attribute are provides, there will be runtime error.
1041\end_layout
1042
1043\begin_layout Standard
1044All attributes of domain can be found in Reference Guide.
1045\end_layout
1046
1047\end_body
1048\end_document
Note: See TracBrowser for help on using the repository browser.