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

Last change on this file since 669 was 669, checked in by mhnguyen, 6 years ago

Updating user document

File size: 23.9 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 Standard
324It is not difficult to define a transformation: Include type of transformation
325 inside domain definition, as the following
326\end_layout
327
328\begin_layout Standard
329\begin_inset listings
330lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
331inline false
332status open
333
334\begin_layout Plain Layout
335
336<domain_definition>
337\end_layout
338
339\begin_layout Plain Layout
340
341  <domain id="domain_A" />
342\end_layout
343
344\begin_layout Plain Layout
345
346  <domain id="domain_A_zoom" domain_ref="domain_A">
347\end_layout
348
349\begin_layout Plain Layout
350
351   <zoom_domain zoom_ibegin="1" zoom_ni="3" zoom_jbegin="0" zoom_nj="2"/>
352\end_layout
353
354\begin_layout Plain Layout
355
356  </domain>
357\end_layout
358
359\begin_layout Plain Layout
360
361</domain_definition>
362\end_layout
363
364\end_inset
365
366
367\end_layout
368
369\begin_layout Standard
370The concrete example above says many things: a domain named domain_A_zoom
371 is transformed from domain name domain_A with a zoom activity.
372 The detailed attributes of zoom_domain can be found in reference document,
373 but simply it contains the begining and size of zoomed region.
374\end_layout
375
376\begin_layout Standard
377One remark is the transformed domain SHOULD have an id, in this case, it's
378 domain_A_zoom.
379 As mentioned before, a no-id domain or any no-id component of XIOS can
380 only be used inside its definition scope.
381 It exists but is useless.
382 So care about that.
383\end_layout
384
385\begin_layout Standard
386To make use of transformation, the grid must contain domains which reference
387 to transformed ones.
388 
389\end_layout
390
391\begin_layout Standard
392\begin_inset listings
393lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
394inline false
395status open
396
397\begin_layout Plain Layout
398
399<grid id="grid_A">          
400\end_layout
401
402\begin_layout Plain Layout
403
404   <domain domain_ref="domain_A" />
405\end_layout
406
407\begin_layout Plain Layout
408
409 </grid>
410\end_layout
411
412\begin_layout Plain Layout
413
414<grid id="grid_A_zoom">          
415\end_layout
416
417\begin_layout Plain Layout
418
419   <domain domain_ref="domain_A_zoom" />
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
433On defining this way, we tell XIOS to establish a connection between two
434 grids by a transformation (zoom) with: grid source - grid_A, grid destination
435 - grid_A_zoom.
436\end_layout
437
438\begin_layout Standard
439As mentioned in Grid Chapter, in order to use transformed grid, just reference
440 to it in field_definition
441\end_layout
442
443\begin_layout Standard
444\begin_inset listings
445lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
446inline false
447status open
448
449\begin_layout Plain Layout
450
451<field_definition level="1" enabled=".TRUE." default_value="9.96921e+36">
452\end_layout
453
454\begin_layout Plain Layout
455
456  <field id="field_A"  operation="average" freq_op="3600s" grid_ref="grid_A"
457 />
458\end_layout
459
460\begin_layout Plain Layout
461
462  <field id="field_A_zoom"  operation="average" freq_op="3600s" grid_ref="grid_A
463_zoom" />
464\end_layout
465
466\begin_layout Plain Layout
467
468 </field_definition>
469\end_layout
470
471\end_inset
472
473
474\end_layout
475
476\begin_layout Standard
477Although xml is helpful to define several configurations, it can not be
478 used to customize attributes of domain.
479 So it's the turn of Fortran interface.
480\end_layout
481
482\begin_layout Section
483Working with FORTRAN code
484\end_layout
485
486\begin_layout Standard
487One of the important concepts to grasp in mind in using FORTRAN interface
488 is the data distribution.
489 With a distributed-memory XIOS, data are broken into disjoint blocks, one
490 per client process.
491 In the next sections, local describes everything related to a client process,
492 whereas global means whole data.
493 The followings describe the essential parts of domain.
494 Details of its attributes and operations can be found in XIOS reference
495 guide
496\end_layout
497
498\begin_layout Subsection
499Domain type
500\end_layout
501
502\begin_layout Standard
503Domain is a two dimensional coordinates, which can be considered to be composed
504 of two axis: y-axis and x-axis.
505 However, different from two axis composed mechanically, a domain contains
506 more typical information which play an important role in specific cases.
507 Very often, in meteorological applications, domain represents a surface
508 with latitude and longitude.
509 Because these properties change from one domain type to another, it is
510 recommended to use domain in case of representing a surface.
511\end_layout
512
513\begin_layout Standard
514In XIOS, a domain can be represented by one of three different types of
515 coordinate system which also differentiate the way to represent latitude
516 and longitude correspondingly.
517 
518\end_layout
519
520\begin_layout Itemize
521rectilinear: a simple 2-dimensional Cartesian coordinates with two perpendicular
522 axes.
523 Latitude represents the y-axe while longitude represents the x-axe.
524\end_layout
525
526\begin_layout Itemize
527curvilinear: a 2-dimensional coordinates allows the generality of two axes
528 not perpendicular to each other.
529 Latitude and longitude have the size equivalent to size of whole domain.
530 
531\end_layout
532
533\begin_layout Itemize
534unstructured: not any of two above, the latitutude and longitude, as curvilinear
535, are reprensented with the help of boundaries.
536 
537\end_layout
538
539\begin_layout Standard
540Different from XIOS 1.0, in this new version, users must explicitly specify
541 the type of domain which they would like to use
542\end_layout
543
544\begin_layout Standard
545\begin_inset listings
546lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
547inline false
548status open
549
550\begin_layout Plain Layout
551
552CALL xios_set_domain_attr("domain_A",type='rectilinear')
553\end_layout
554
555\end_inset
556
557
558\end_layout
559
560\begin_layout Standard
561Althoug there are different domain types, they share the similar patterns
562 to settle local data on a client process: There are some essential attributes
563 to define.
564 The next sections describe their meanings and how to specify correctly
565 data for a local domain.
566\end_layout
567
568\begin_layout Subsection
569Local domain index
570\end_layout
571
572\begin_layout Standard
573It is not uncommon that a global domain is broken into several pieces, each
574 of which is distributed to one process.
575 Following we consider a simple case: a domain of rectilinear type with
576 global size 9 x 9 and its data is distributed evenly among 9 client processes,
577 each of which has 3x3.
578\end_layout
579
580\begin_layout Standard
581\begin_inset Float figure
582placement !tbph
583wide false
584sideways false
585status open
586
587\begin_layout Plain Layout
588\begin_inset Graphics
589        filename ../images/Distributed_Domain.pdf
590        lyxscale 50
591        scale 60
592
593\end_inset
594
595
596\end_layout
597
598\begin_layout Plain Layout
599\begin_inset Caption Standard
600
601\begin_layout Plain Layout
602Global domain data
603\end_layout
604
605\end_inset
606
607
608\begin_inset CommandInset label
609LatexCommand label
610name "globalDomain"
611
612\end_inset
613
614
615\end_layout
616
617\end_inset
618
619
620\end_layout
621
622\begin_layout Standard
623The region of local domain can be described by one of the following way.
624\end_layout
625
626\begin_layout Standard
627Specify the the beginning and size of local domain with:
628\end_layout
629
630\begin_layout Itemize
631ni_glo, nj_glo: global size of x-axis and y-axis correspondingly.
632 
633\end_layout
634
635\begin_layout Itemize
636ibegin, jbegin: global position on x-axis and y-axis where a local domain
637 begin
638\end_layout
639
640\begin_layout Itemize
641ni, nj: local size of domain of each process on x-axis and y-axis
642\end_layout
643
644\begin_layout Standard
645Or tell XIOS exactly the global position of each point in the local domain,
646 from left to right, top to bottom with:
647\end_layout
648
649\begin_layout Itemize
650i_index, j_index: array of global position of every point in the local domain.
651 It is very useful when local domains do not align with each other.
652\end_layout
653
654\begin_layout Standard
655For example, with the first method, the local domain in the middle (the
656 blue one) can be specified with:
657\end_layout
658
659\begin_layout Standard
660\begin_inset listings
661lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
662inline false
663status open
664
665\begin_layout Plain Layout
666
667CALL xios_set_domain_attr("domain_A",ni_glo=9, nj_glo=9, ibegin=3, ni=3,
668 jbegin=3, nj=3)
669\end_layout
670
671\end_inset
672
673
674\end_layout
675
676\begin_layout Standard
677The second method demands only two arrays:
678\end_layout
679
680\begin_layout Standard
681\begin_inset listings
682lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
683inline false
684status open
685
686\begin_layout Plain Layout
687
688CALL xios_set_domain_attr("domain_A",i_index=iIndex, j_index=jIndex)
689\end_layout
690
691\end_inset
692
693
694\end_layout
695
696\begin_layout Standard
697and
698\end_layout
699
700\begin_layout Itemize
701iIndex={3,4,5,3,4,5,3,4,5}, jIndex = {3,3,3,4,4,4,5,5,5}
702\end_layout
703
704\begin_layout Subsection
705Local domain data
706\end_layout
707
708\begin_layout Standard
709Similar to define local index, local data can be done in two ways.
710\end_layout
711
712\begin_layout Standard
713Specify the begining and size of data on the local domain:
714\end_layout
715
716\begin_layout Itemize
717data_ibegin, data_jbegin: the local position of data on x-axis and y-axis
718 where data begins
719\end_layout
720
721\begin_layout Itemize
722data_ni, data_nj: size of data on each axis
723\end_layout
724
725\begin_layout Standard
726Or specify data with its position in the local domain, from left to right,
727 top to bottom with
728\end_layout
729
730\begin_layout Itemize
731data_i_index, data_j_index: array of local position of data in the local
732 domain.
733\end_layout
734
735\begin_layout Standard
736Beside the attributes above, one of the essential attributes to define is
737 dimensional size of data - data_dim.
738 Although domain has two dimensions, data are not required to be 2-dimensional.
739 In particular, for case of data_dim == 1, XIOS uses an
740\shape italic
7411-dimensional block distribution
742\shape default
743 of data, distributed along the first dimension, the x-axis.
744\end_layout
745
746\begin_layout Standard
747With the first way to define data on a local domain, we can use:
748\end_layout
749
750\begin_layout Standard
751\begin_inset listings
752lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
753inline false
754status open
755
756\begin_layout Plain Layout
757
758CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2,
759 data_jbegin=-1, data_nj=nj+2)
760\end_layout
761
762\end_inset
763
764
765\end_layout
766
767\begin_layout Standard
768In order to be processed correctly, data must be specified with the begining
769 and size of its block .
770 For two-dimensional data, it can be done with data_ibegin, data_ni for
771 the first dimension and data_jbegin, data_nj for the second dimension.
772 In case of one-dimensional data, it is only necessary to determine data_ibegin
773 and data_ni.
774 Although the valid data must be inside a domain, it is not neccessary for
775 data to have same size as domain.
776 In fact, data can have larger size than domain on each dimension, this
777 is often the case of
778\begin_inset Quotes eld
779\end_inset
780
781ghost cell
782\begin_inset Quotes erd
783\end_inset
784
785.
786 The attributes data_ibegin and data_jbegin specify the offset of data from
787 local domain.
788 For local domain_A, the negative value indicates that data is larger than
789 local domain, the valid part of data needs extracted from the real data.
790 A positive value indicates data is smaller than local domain.
791 The default value of data_ibegin/data_jbegin is 0, which implies that data
792 fit into local domain properly.
793 
794\end_layout
795
796\begin_layout Standard
797\begin_inset Float figure
798placement !tbph
799wide false
800sideways false
801status open
802
803\begin_layout Plain Layout
804\begin_inset Graphics
805        filename ../images/Domain.pdf
806        lyxscale 50
807        scale 60
808
809\end_inset
810
811
812\end_layout
813
814\begin_layout Plain Layout
815\begin_inset Caption Standard
816
817\begin_layout Plain Layout
818Local domain with data
819\end_layout
820
821\end_inset
822
823
824\begin_inset CommandInset label
825LatexCommand label
826name "localDomain"
827
828\end_inset
829
830
831\end_layout
832
833\end_inset
834
835
836\end_layout
837
838\begin_layout Standard
839On Figure
840\begin_inset CommandInset ref
841LatexCommand ref
842reference "localDomain"
843
844\end_inset
845
846, local domain occupies the center of the global domain, whereas real data
847 fill up a larger region.
848 Only data inside the local domain, represented by blue cells, are valid.
849 
850\end_layout
851
852\begin_layout Standard
853With the secon way, data can be represented with:
854\end_layout
855
856\begin_layout Standard
857\begin_inset listings
858lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
859inline false
860status open
861
862\begin_layout Plain Layout
863
864CALL xios_set_domain_attr("domain_A",data_dim=2, data_i_index=dataI, data_j_inde
865x=dataJ)
866\end_layout
867
868\end_inset
869
870
871\end_layout
872
873\begin_layout Standard
874with
875\end_layout
876
877\begin_layout Itemize
878dataJ = {-1,-1,-1,-1,-1,0,0,0,0,0,1,1,1,1,1,2,2,2,3,3,3,3,3}
879\end_layout
880
881\begin_layout Itemize
882dataI = {-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}
883\end_layout
884
885\begin_layout Standard
886As mentioned, data on a domain are two-dimensional but in some cases, there
887 is a need to write data continously, there comes one-dimensional data.
888 With the precedent example, we can define one dimensional data with:
889\end_layout
890
891\begin_layout Standard
892\begin_inset listings
893lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
894inline false
895status open
896
897\begin_layout Plain Layout
898
899CALL xios_set_domain_attr("domain_A",data_dim=1, data_i_index=dataI)
900\end_layout
901
902\end_inset
903
904
905\end_layout
906
907\begin_layout Standard
908and
909\end_layout
910
911\begin_layout Itemize
912dataI = {-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}
913\end_layout
914
915\begin_layout Standard
916Above are the mandatory attributes to define local domain.
917 There are some auxilliary attributes which make data meaningful, especially
918 for meteorological one.
919 The next section disscuses these attributes.
920\end_layout
921
922\begin_layout Subsection
923Longitude and latitude
924\end_layout
925
926\begin_layout Standard
927Different from the previous version, in XIOS 2.0, lonngitude and latitude
928 are optional.
929 Moreover, to be coherent to the data_dim concept, there are more ways to
930 input longitude and latitude values.
931\end_layout
932
933\begin_layout Standard
934Like data, longitude and latitude values can be one or two dimension.
935 The first ones are represented with lonvalue_1d, latvalue_1d; the second
936 ones are specified with lonvalue_2d and latvalue_2d.
937\end_layout
938
939\begin_layout Standard
940With the same domain_A, we can have longitude and latitude by calling:
941\end_layout
942
943\begin_layout Standard
944\begin_inset listings
945lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
946inline false
947status open
948
949\begin_layout Plain Layout
950
951CALL xios_set_domain_attr("domain_A",lonvalue_1d=lon1D, latvalue_1d=lat1D)
952\end_layout
953
954\end_inset
955
956
957\end_layout
958
959\begin_layout Standard
960with
961\end_layout
962
963\begin_layout Itemize
964lon1D = {30, 40, 50, 30, 40, 50, 30, 40, 50}
965\end_layout
966
967\begin_layout Itemize
968lat1D = {30, 30, 30, 40, 40, 40, 50, 50, 50}
969\end_layout
970
971\begin_layout Standard
972Or by using two-dimension longitude and latitude
973\end_layout
974
975\begin_layout Standard
976\begin_inset listings
977lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
978inline false
979status open
980
981\begin_layout Plain Layout
982
983CALL xios_set_domain_attr("domain_A",lonvalue_2d=lon2D, latvalue_1d=lat2D)
984\end_layout
985
986\end_inset
987
988
989\end_layout
990
991\begin_layout Standard
992with
993\end_layout
994
995\begin_layout Itemize
996lon2D = {
997\begin_inset Formula $\begin{array}{ccc}
99830 & 40 & 50\\
99930 & 40 & 50\\
100030 & 40 & 50
1001\end{array}$
1002\end_inset
1003
1004}
1005\end_layout
1006
1007\begin_layout Itemize
1008lat1D = {
1009\begin_inset Formula $\begin{array}{ccc}
101030 & 30 & 30\\
101140 & 40 & 40\\
101250 & 50 & 50
1013\end{array}$
1014\end_inset
1015
1016}
1017\end_layout
1018
1019\begin_layout Standard
1020For unstructured mesh, a cell can have different number of vertices than
1021 rectinlinear, in this case, longitude and latitude value of the vertex
1022 of cell are specified with bounds_lon_1d and bounds_lat_1d.
1023\end_layout
1024
1025\begin_layout Standard
1026For curlinear mesh, bounds_lon_2d and bounds_lat_2d provide a convenient
1027 way to define longitude and latitude value for the vertex of the cell.
1028 However, it is possible to use bounds_lon_1d and bounds_lat_1d to describe
1029 these values.
1030\end_layout
1031
1032\begin_layout Standard
1033One thing to remind, only *_1d or *_2d attributes are used, if *_1d and
1034 *_2d of a same attribute are provides, there will be runtime error.
1035\end_layout
1036
1037\begin_layout Standard
1038All attributes of domain can be found in Reference Guide.
1039\end_layout
1040
1041\end_body
1042\end_document
Note: See TracBrowser for help on using the repository browser.