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

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

Updating User guide and reference doc

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.
320 The calculation on the fly will be implemented soon.
321\end_layout
322
323\begin_layout Itemize
324generate_rectilinear_domain: auto generating, distributing a rectilinear
325 domain then filling all mandatory attributes.
326\end_layout
327
328\begin_layout Standard
329It is not difficult to define a transformation: Include type of transformation
330 inside domain definition, as the following
331\end_layout
332
333\begin_layout Standard
334\begin_inset listings
335lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
336inline false
337status open
338
339\begin_layout Plain Layout
340
341<domain_definition>
342\end_layout
343
344\begin_layout Plain Layout
345
346  <domain id="domain_A" />
347\end_layout
348
349\begin_layout Plain Layout
350
351  <domain id="domain_A_zoom" domain_ref="domain_A">
352\end_layout
353
354\begin_layout Plain Layout
355
356   <zoom_domain zoom_ibegin="1" zoom_ni="3" zoom_jbegin="0" zoom_nj="2"/>
357\end_layout
358
359\begin_layout Plain Layout
360
361  </domain>
362\end_layout
363
364\begin_layout Plain Layout
365
366</domain_definition>
367\end_layout
368
369\end_inset
370
371
372\end_layout
373
374\begin_layout Standard
375The concrete example above tells many things: a domain named domain_A_zoom
376 is transformed from domain name domain_A with a zoom activity.
377 The domain_A_zoom is the zoomed region of domain_A.
378 The detailed attributes of zoom_domain can be found in reference document,
379 but simply it contains the begining and size of zoomed region.
380\end_layout
381
382\begin_layout Standard
383One remark is the transformed domain SHOULD have an id, in this case, it's
384 domain_A_zoom.
385 As mentioned before, a no-id domain or any no-id component of XIOS can
386 only be used inside its definition scope.
387 It exists but is useless.
388 So care about that.
389\end_layout
390
391\begin_layout Standard
392To make use of transformation, the grid must contain domains which reference
393 to transformed ones.
394 
395\end_layout
396
397\begin_layout Standard
398\begin_inset listings
399lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
400inline false
401status open
402
403\begin_layout Plain Layout
404
405<grid id="grid_A">          
406\end_layout
407
408\begin_layout Plain Layout
409
410   <domain domain_ref="domain_A" />
411\end_layout
412
413\begin_layout Plain Layout
414
415 </grid>
416\end_layout
417
418\begin_layout Plain Layout
419
420<grid id="grid_A_zoom">          
421\end_layout
422
423\begin_layout Plain Layout
424
425   <domain domain_ref="domain_A_zoom" />
426\end_layout
427
428\begin_layout Plain Layout
429
430 </grid>
431\end_layout
432
433\end_inset
434
435
436\end_layout
437
438\begin_layout Standard
439On defining this way, we tell XIOS to establish a connection between two
440 grids by a transformation (zoom) with: grid source - grid_A, grid destination
441 - grid_A_zoom.
442\end_layout
443
444\begin_layout Standard
445As mentioned in Grid Chapter, in order to use transformed grid, just reference
446 to it in field_definition
447\end_layout
448
449\begin_layout Standard
450\begin_inset listings
451lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
452inline false
453status open
454
455\begin_layout Plain Layout
456
457<field_definition level="1" enabled=".TRUE." default_value="9.96921e+36">
458\end_layout
459
460\begin_layout Plain Layout
461
462  <field id="field_A"  operation="average" freq_op="3600s" grid_ref="grid_A"
463 />
464\end_layout
465
466\begin_layout Plain Layout
467
468  <field id="field_A_zoom"  operation="average" freq_op="3600s" grid_ref="grid_A
469_zoom" />
470\end_layout
471
472\begin_layout Plain Layout
473
474 </field_definition>
475\end_layout
476
477\end_inset
478
479
480\end_layout
481
482\begin_layout Standard
483Although xml is helpful to define several configurations, it is not convenient
484 to customize attributes of domain.
485 So it's the turn of Fortran interface.
486\end_layout
487
488\begin_layout Section
489Working with FORTRAN code
490\end_layout
491
492\begin_layout Standard
493One of the important concepts to grasp in mind in using FORTRAN interface
494 is the data distribution.
495 With a distributed-memory XIOS, data are broken into disjoint blocks, one
496 per client process.
497 In the next sections, local describes everything related to a client process,
498 whereas global means whole data.
499 The followings describe the essential parts of domain.
500 Details of its attributes and operations can be found in XIOS reference
501 guide
502\end_layout
503
504\begin_layout Subsection
505Domain type
506\end_layout
507
508\begin_layout Standard
509Domain is a two dimensional coordinates, which can be considered to be composed
510 of two axis: y-axis and x-axis.
511 However, different from two axis composed mechanically, a domain contains
512 more typical information which play an important role in specific cases.
513 Very often, in meteorological applications, domain represents a surface
514 with latitude and longitude.
515 Because these properties change from one domain type to another, it is
516 recommended to use domain in case of representing a surface.
517\end_layout
518
519\begin_layout Standard
520In XIOS, a domain can be represented by one of three different types of
521 coordinate system which also differentiate the way to represent latitude
522 and longitude correspondingly.
523 
524\end_layout
525
526\begin_layout Itemize
527rectilinear: a simple 2-dimensional Cartesian coordinates with two perpendicular
528 axes.
529 Latitude represents the y-axe while longitude represents the x-axe.
530\end_layout
531
532\begin_layout Itemize
533curvilinear: a 2-dimensional coordinates allows the generality of two axes
534 not perpendicular to each other.
535 Latitude and longitude have the size equivalent to size of whole domain.
536 
537\end_layout
538
539\begin_layout Itemize
540unstructured: not any of two above, the latitutude and longitude, as curvilinear
541, are reprensented with the help of boundaries.
542 
543\end_layout
544
545\begin_layout Standard
546Different from XIOS 1.0, in this new version, users must explicitly specify
547 the type of domain which they would like to use
548\end_layout
549
550\begin_layout Standard
551\begin_inset listings
552lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
553inline false
554status open
555
556\begin_layout Plain Layout
557
558CALL xios_set_domain_attr("domain_A",type='rectilinear')
559\end_layout
560
561\end_inset
562
563
564\end_layout
565
566\begin_layout Standard
567Althoug there are different domain types, they share the similar patterns
568 to settle local data on a client process: There are some essential attributes
569 to define.
570 The next sections describe their meanings and how to specify correctly
571 data for a local domain.
572\end_layout
573
574\begin_layout Subsection
575Local domain index
576\end_layout
577
578\begin_layout Standard
579It is not uncommon that a global domain is broken into several pieces, each
580 of which is distributed to one process.
581 Following we consider a simple case: a domain of rectilinear type with
582 global size 9 x 9 and its data is distributed evenly among 9 client processes,
583 each of which has 3x3.
584\end_layout
585
586\begin_layout Standard
587\begin_inset Float figure
588placement !tbph
589wide false
590sideways false
591status open
592
593\begin_layout Plain Layout
594\begin_inset Graphics
595        filename ../images/Distributed_Domain.pdf
596        lyxscale 50
597        scale 60
598
599\end_inset
600
601
602\end_layout
603
604\begin_layout Plain Layout
605\begin_inset Caption Standard
606
607\begin_layout Plain Layout
608Global domain data
609\end_layout
610
611\end_inset
612
613
614\begin_inset CommandInset label
615LatexCommand label
616name "globalDomain"
617
618\end_inset
619
620
621\end_layout
622
623\end_inset
624
625
626\end_layout
627
628\begin_layout Standard
629The region of local domain can be described by one of the following way.
630\end_layout
631
632\begin_layout Standard
633Specify the the beginning and size of local domain with:
634\end_layout
635
636\begin_layout Itemize
637ni_glo, nj_glo: global size of x-axis and y-axis correspondingly.
638 
639\end_layout
640
641\begin_layout Itemize
642ibegin, jbegin: global position on x-axis and y-axis where a local domain
643 begin
644\end_layout
645
646\begin_layout Itemize
647ni, nj: local size of domain of each process on x-axis and y-axis
648\end_layout
649
650\begin_layout Standard
651Or tell XIOS exactly the global position of each point in the local domain,
652 from left to right, top to bottom with:
653\end_layout
654
655\begin_layout Itemize
656i_index, j_index: array of global position of every point in the local domain.
657 It is very useful when local domains do not align with each other.
658\end_layout
659
660\begin_layout Standard
661For example, with the first method, the local domain in the middle (the
662 blue one) can be specified with:
663\end_layout
664
665\begin_layout Standard
666\begin_inset listings
667lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
668inline false
669status open
670
671\begin_layout Plain Layout
672
673CALL xios_set_domain_attr("domain_A",ni_glo=9, nj_glo=9, ibegin=3, ni=3,
674 jbegin=3, nj=3)
675\end_layout
676
677\end_inset
678
679
680\end_layout
681
682\begin_layout Standard
683The second method demands only two arrays:
684\end_layout
685
686\begin_layout Standard
687\begin_inset listings
688lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
689inline false
690status open
691
692\begin_layout Plain Layout
693
694CALL xios_set_domain_attr("domain_A",i_index=iIndex, 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 curlinear 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.