Ignore:
Timestamp:
04/10/17 18:46:02 (7 years ago)
Author:
mhnguyen
Message:

Update user guide and reference guide

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/doc/inputs/user/Domain.lyx

    r821 r1084  
    1 #LyX 2.1 created this file. For more info see http://www.lyx.org/ 
    2 \lyxformat 474 
     1#LyX 2.2 created this file. For more info see http://www.lyx.org/ 
     2\lyxformat 508 
    33\begin_document 
    44\begin_header 
     5\save_transient_properties true 
     6\origin unavailable 
    57\textclass book 
    68\use_default_options true 
     
    1113\inputencoding auto 
    1214\fontencoding global 
    13 \font_roman default 
    14 \font_sans default 
    15 \font_typewriter default 
    16 \font_math auto 
     15\font_roman "default" "default" 
     16\font_sans "default" "default" 
     17\font_typewriter "default" "default" 
     18\font_math "auto" "auto" 
    1719\font_default_family default 
    1820\use_non_tex_fonts false 
    1921\font_sc false 
    2022\font_osf false 
    21 \font_sf_scale 100 
    22 \font_tt_scale 100 
     23\font_sf_scale 100 100 
     24\font_tt_scale 100 100 
    2325\graphics default 
    2426\default_output_format default 
     
    143145\color inherit 
    144146 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 Domains defined by a same Id always represent only one domain. 
    147148\end_layout 
    148149 
     
    181182\begin_layout Standard 
    182183Very 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 To make a reference to a domain, we use  
     185\shape italic 
     186domain_ref 
    184187\end_layout 
    185188 
     
    216219 The domain with implicit id can only be used inside the scope where it 
    217220 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 
    220 on. 
     221 It is useless to define a domain without id inside domain_definition. 
     222 Meanwhile, the domain_ref is utilized widely outside the scope of domain_defini 
     223tion. 
    221224\end_layout 
    222225 
     
    230233\series default 
    231234\color inherit 
    232 Moreover it is the only region where we can define a new domain outside 
     235However, it is the only region where we can define a new domain outside 
    233236 domain_definition. 
    234237\end_layout 
     
    286289 
    287290\begin_layout Standard 
    288 One 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 
    298 n on its sub-component: domain or axis. 
    299 \end_layout 
    300  
    301 \begin_layout Standard 
    302 Because 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 
    308 Till now, XIOS supports the following transformation on domain: 
    309 \end_layout 
    310  
    311 \begin_layout Itemize 
    312 zoom_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 
    317 interpolation_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 
    323 generate_rectilinear_domain: auto generating, distributing a rectilinear 
    324  domain then filling all mandatory attributes. 
    325 \end_layout 
    326  
    327 \begin_layout Standard 
    328 It 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 
    334 lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" 
    335 inline false 
    336 status 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 
    374 The 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 
    382 One 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 
    391 To 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 
    398 lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" 
    399 inline false 
    400 status 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 
    438 On 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 
    444 As 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 
    450 lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}" 
    451 inline false 
    452 status 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 
    482 Although 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. 
     291One of a new concept which differentiates XIOS 2.0 from its precedent is 
     292 (spatial) transformation, which can be defined inside a domain. 
     293 All transformations on a domain have form *_domain. 
     294 See Chapter  
     295\begin_inset CommandInset ref 
     296LatexCommand ref 
     297reference "chap:Transformation" 
     298 
     299\end_inset 
     300 
     301 for more details. 
    485302\end_layout 
    486303 
     
    526343rectilinear: a simple 2-dimensional Cartesian coordinates with two perpendicular 
    527344 axes. 
    528  Latitude represents the y-axe while longitude represents the x-axe. 
     345 Latitude represents the y-axis while longitude represents the x-axe. 
    529346\end_layout 
    530347 
     
    537354 
    538355\begin_layout Itemize 
    539 unstructured: not any of two above, the latitutude and longitude, as curvilinear 
    540 , are reprensented with the help of boundaries. 
     356unstructured: not any of two above, the latitude and longitude, as curvilinear, 
     357 are represented with the help of boundaries. 
    541358  
    542359\end_layout 
     
    564381 
    565382\begin_layout Standard 
    566 Althoug there are different domain types, they share the similar patterns 
     383Although there are different domain types, they share the similar patterns 
    567384 to settle local data on a client process: There are some essential attributes 
    568385 to define. 
     
    578395It is not uncommon that a global domain is broken into several pieces, each 
    579396 of which is distributed to one process. 
    580  Following we consider a simple case: a domain of rectilinear type with 
     397 Following, we consider a simple case: a domain of rectilinear type with 
    581398 global size 9 x 9 and its data is distributed evenly among 9 client processes, 
    582399 each of which has 3x3. 
     
    634451 
    635452\begin_layout Itemize 
     453ibegin, jbegin: global position on x-axis and y-axis where a local domain 
     454 begin 
     455\end_layout 
     456 
     457\begin_layout Itemize 
     458ni, nj: local size of domain of each process on x-axis and y-axis 
     459\end_layout 
     460 
     461\begin_layout Itemize 
    636462ni_glo, nj_glo: global size of x-axis and y-axis correspondingly. 
    637463  
    638464\end_layout 
    639465 
    640 \begin_layout Itemize 
    641 ibegin, jbegin: global position on x-axis and y-axis where a local domain 
    642  begin 
    643 \end_layout 
    644  
    645 \begin_layout Itemize 
    646 ni, nj: local size of domain of each process on x-axis and y-axis 
    647 \end_layout 
    648  
    649466\begin_layout Standard 
    650467Or tell XIOS exactly the global position of each point in the local domain, 
     
    717534 
    718535\begin_layout Standard 
    719 Specify the begining and size of data on the local domain: 
     536Specify the beginning and size of data on the local domain: 
    720537\end_layout 
    721538 
    722539\begin_layout Itemize 
    723540data_ibegin, data_jbegin: the local position of data on x-axis and y-axis 
    724  where data begins 
     541 where data begins inside the local domain 
    725542\end_layout 
    726543 
     
    772589 
    773590\begin_layout Standard 
    774 In order to be processed correctly, data must be specified with the begining 
     591In order to be processed correctly, data must be specified with the beginning 
    775592 and size of its block . 
    776593 For two-dimensional data, it can be done with data_ibegin, data_ni for 
     
    778595 In case of one-dimensional data, it is only necessary to determine data_ibegin 
    779596 and data_ni. 
    780  Although the valid data must be inside a local domain, it is not neccessary 
     597 Although the valid data must be inside a local domain, it is not necessary 
    781598 for data to have same size as local domain. 
    782599 In fact, data can have larger size than domain on each dimension, this 
     
    857674 
    858675\begin_layout Standard 
    859 With the secon way, data can be represented with: 
     676With the second way, data can be represented with: 
    860677\end_layout 
    861678 
     
    891708\begin_layout Standard 
    892709As 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. 
     710 is a need to write data continuously, there comes one-dimensional data. 
    894711 With the precedent example, we can define one dimensional data with: 
    895712\end_layout 
     
    921738\begin_layout Standard 
    922739Above are the mandatory attributes to define local domain. 
    923  There are some auxilliary attributes which make data meaningful, especially 
     740 There are some auxiliary attributes which make data meaningful, especially 
    924741 for meteorological one. 
    925  The next section disscuses these attributes. 
     742 The next section discuses these attributes. 
    926743\end_layout 
    927744 
     
    931748 
    932749\begin_layout Standard 
    933 Different from the previous version, in XIOS 2.0, lonngitude and latitude 
     750Different from the previous version, in XIOS 2.0, longitude and latitude 
    934751 are optional. 
    935752 Moreover, to be coherent to the data_dim concept, there are more ways to 
     
    1025842\begin_layout Standard 
    1026843For 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. 
     844 rectilinear, in this case, longitude and latitude value of the vertex of 
     845 cell are specified with bounds_lon_1d and bounds_lat_1d. 
    1029846\end_layout 
    1030847 
     
    1038855\begin_layout Standard 
    1039856One 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. 
     857 *_2d of a same attribute are provides, there will be run-time error. 
    1041858\end_layout 
    1042859 
Note: See TracChangeset for help on using the changeset viewer.