123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715 |
- #LyX 2.1 created this file. For more info see http://www.lyx.org/
- \lyxformat 474
- \begin_document
- \begin_header
- \textclass book
- \use_default_options true
- \master ../../XIOS_user_guide.lyx
- \maintain_unincluded_children false
- \language english
- \language_package default
- \inputencoding auto
- \fontencoding global
- \font_roman default
- \font_sans default
- \font_typewriter default
- \font_math auto
- \font_default_family default
- \use_non_tex_fonts false
- \font_sc false
- \font_osf false
- \font_sf_scale 100
- \font_tt_scale 100
- \graphics default
- \default_output_format default
- \output_sync 0
- \bibtex_command default
- \index_command default
- \float_placement !tph
- \paperfontsize default
- \spacing single
- \use_hyperref false
- \papersize a4paper
- \use_geometry false
- \use_package amsmath 1
- \use_package amssymb 1
- \use_package cancel 1
- \use_package esint 1
- \use_package mathdots 1
- \use_package mathtools 1
- \use_package mhchem 1
- \use_package stackrel 1
- \use_package stmaryrd 1
- \use_package undertilde 1
- \cite_engine basic
- \cite_engine_type default
- \biblio_style plain
- \use_bibtopic false
- \use_indices false
- \paperorientation portrait
- \suppress_date false
- \justification true
- \use_refstyle 1
- \index Index
- \shortcut idx
- \color #008000
- \end_index
- \secnumdepth 3
- \tocdepth 3
- \paragraph_separation indent
- \paragraph_indentation default
- \quotes_language english
- \papercolumns 1
- \papersides 1
- \paperpagestyle default
- \tracking_changes false
- \output_changes false
- \html_math_output 0
- \html_css_as_file 0
- \html_be_strict false
- \end_header
- \begin_body
- \begin_layout Chapter
- Axis
- \end_layout
- \begin_layout Standard
- Like Domain, Axis is a sub-component of Grid but is one dimension.
- In meteorological applications, axis represents a vertical line with different
- levels.
- \end_layout
- \begin_layout Section
- Working with configuration file
- \end_layout
- \begin_layout Standard
- The way to define an axis with configuration file is similar to define a
- domain.
- \end_layout
- \begin_layout Subsection
- Basic configuration
- \end_layout
- \begin_layout Standard
- Similar to domain, an axis is defined inside its definition part with the
- tag
- \series bold
- \color black
- axis_definition
- \series default
- \color inherit
- .
-
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- <axis_definition>
- \end_layout
- \begin_layout Plain Layout
- <axis id="axis_A" />
- \end_layout
- \begin_layout Plain Layout
- <axis axis_ref="axis_A" />
- \end_layout
- \begin_layout Plain Layout
- </axis_definition>
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- The first one is to specify explicitly identification of an axis with an
- id.
-
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- <axis_definition>
- \end_layout
- \begin_layout Plain Layout
- <axis id="axis_A" />
- \end_layout
- \begin_layout Plain Layout
- </axis_definition>
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- In this way, with id, the axis can be processed, e.x modified its attributes,
- with Fortran interface; besides, it is only possible to reference to a
- axis whose id is explicitly defined.
- \end_layout
- \begin_layout Standard
- To make a reference to an axis, we use axis_ref
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- <axis_definition>
- \end_layout
- \begin_layout Plain Layout
- <axis axis_ref="axis_A" />
- \end_layout
- \begin_layout Plain Layout
- </axis_definition>
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- An axis defined by axis_ref will inherit all attributes of the referenced
- one, except its id attribute.
- If there is no id specified, an implicit one is assigned to this new axis.
- The axis with implicit id can only be used inside the scope where it is
- defined, it can not be referenced, nor be processed.
- It is rare to define an axis without id inside axis_definition.
-
- \end_layout
- \begin_layout Standard
- To define a new axis inside a grid, we use the tag
- \series bold
- \color black
- axis.
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- <grid id="grid_A">
- \end_layout
- \begin_layout Plain Layout
- <axis axis_ref="axis_A" />
- \end_layout
- \begin_layout Plain Layout
- </grid>
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- The xml lines above can be translated as: the grid_A composed of an axis_A
- that is defined somewhere else before.
- More precisely, the grid grid_A is constituted of a
- \begin_inset Quotes eld
- \end_inset
- unknown id
- \begin_inset Quotes erd
- \end_inset
- axis which has inherited all attributes (and their values) from axis A
- (name, long name, i_index, j_index, ...
- etc).
- \end_layout
- \begin_layout Subsection
- Advanced configuration
- \end_layout
- \begin_layout Standard
- Like domain, there are several transformation which can be defined with
- configuration file.
- All transformations on an axis have form *_axis.
-
- \end_layout
- \begin_layout Standard
- Till now, XIOS supports the following transformation on axis:
- \end_layout
- \begin_layout Itemize
- zoom_axis: Like zoom functionality in XIOS 1.0, the destination grid is the
- zoomed region of the source grid.
- \end_layout
- \begin_layout Itemize
- interpolation_axis: Implement interpolation from an axis to one another.
- For now, only polynominal interpolation is available.
- \end_layout
- \begin_layout Itemize
- inverse_axis: Inverse an axis
- \end_layout
- \begin_layout Standard
- It is not difficult to define a transformation: Include type of transformation
- inside axis definition, as the following
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- <axis_definition>
- \end_layout
- \begin_layout Plain Layout
- <axis id="axis_A" />
- \end_layout
- \begin_layout Plain Layout
- <axis id="axis_A_zoom" axis_ref="axis_A">
- \end_layout
- \begin_layout Plain Layout
- <zoom_axis zoom_begin="1" zoom_n="3"/>
- \end_layout
- \begin_layout Plain Layout
- </axis>
- \end_layout
- \begin_layout Plain Layout
- </axis_definition>
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- The concrete example is translated as: the axis named axis_A_zoom is transformed
- from axis name axis_A with a zoom activity.
- The detailed attributes of zoom_axis can be found in reference document,
- but simply it contains the begining and size of zoomed region.
- \end_layout
- \begin_layout Standard
- One remark is the transformed axis SHOULD have an id, in this case, it's
- axis_A_zoom.
- As mentioned before, a no-id axis or any no-id component of XIOS can only
- be used inside its definition scope.
- \end_layout
- \begin_layout Standard
- To make use of transformation, the grid must contain axis which references
- to transformed ones.
-
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- <grid id="grid_A">
- \end_layout
- \begin_layout Plain Layout
- <axis axis_ref="axis_A" />
- \end_layout
- \begin_layout Plain Layout
- </grid>
- \end_layout
- \begin_layout Plain Layout
- <grid id="grid_A_zoom">
- \end_layout
- \begin_layout Plain Layout
- <axis axis_ref="axis_A_zoom" />
- \end_layout
- \begin_layout Plain Layout
- </grid>
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- On defining this way, we tell XIOS to establish a connection between two
- grids by a transformation (zoom) with: grid source - grid_A, grid destination
- - grid_A_zoom.
- \end_layout
- \begin_layout Standard
- As mentioned in Grid Chapter, in order to use transformed grid, just reference
- to it in field_definition
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- <field_definition level="1" enabled=".TRUE." default_value="9.96921e+36">
- \end_layout
- \begin_layout Plain Layout
- <field id="field_A" operation="average" freq_op="3600s" grid_ref="grid_A"
- />
- \end_layout
- \begin_layout Plain Layout
- <field id="field_A_zoom" operation="average" freq_op="3600s" grid_ref="grid_A
- _zoom" />
- \end_layout
- \begin_layout Plain Layout
- </field_definition>
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- Although xml is helpful to define several configurations, it can not be
- used to customize attributes of axis.
- So it's the turn of Fortran interface.
- \end_layout
- \begin_layout Section
- Working with FORTRAN code
- \end_layout
- \begin_layout Standard
- Although axis is not as complexe as domain, there are some mandatory attributes
- to define.
- Different from precedent version, XIOS 2.0 supports distribution of data
- on a axis.
- The followings describe the essential parts of axis.
- Details of its attributes and operations can be found in XIOS reference
- guide.
- \end_layout
- \begin_layout Subsection
- Local axis index
- \end_layout
- \begin_layout Standard
- Axis is often used with domain, which is broken into several distributed
- pieces, to make a 3 dimension grid.
- However, there are cases in which data on axis are distributed among processes.
- Following we consider a simple case: a axis with global size 9 and its
- data are distributed evenly among 3 client processes, each of which has
- size 3.
- \end_layout
- \begin_layout Standard
- \begin_inset Float figure
- placement !tbph
- wide false
- sideways false
- status open
- \begin_layout Plain Layout
- \begin_inset Graphics
- filename ../images/Distributed_Axis.pdf
- lyxscale 50
- scale 60
- \end_inset
- \end_layout
- \begin_layout Plain Layout
- \begin_inset Caption Standard
- \begin_layout Plain Layout
- Global axis data
- \end_layout
- \end_inset
- \begin_inset CommandInset label
- LatexCommand label
- name "globalAxis"
- \end_inset
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- The local axis can be described by the following way.
- \end_layout
- \begin_layout Standard
- Specify the the beginning and size of local axis with:
- \end_layout
- \begin_layout Itemize
- n_glo: global size of axis.
-
- \end_layout
- \begin_layout Itemize
- begin: global position where a local axis begin
- \end_layout
- \begin_layout Itemize
- n: local size of axis on each process
- \end_layout
- \begin_layout Standard
- For example, the local axis in the middle (the yellow one) can be specified
- with:
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- CALL xios_set_axis_attr("axis_A",n_glo=9, begin=3, n=3)
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Subsection
- Local axis data
- \end_layout
- \begin_layout Standard
- Simpler than local domain data, data on axis is always on-dimension.
- Like local domain data, local axis data represent the data offset from
- local axis, and it can be defined in two ways.
- \end_layout
- \begin_layout Standard
- Specify the begining and size of data on the local axis:
- \end_layout
- \begin_layout Itemize
- data_begin: the local position of data on axis where data begins
- \end_layout
- \begin_layout Itemize
- data_n: size of data on each local axis
- \end_layout
- \begin_layout Standard
- Or specify data with its position in the local axis:
- \end_layout
- \begin_layout Itemize
- data_index: array of local position of data in the local axis.
- \end_layout
- \begin_layout Standard
- Although the valid data must be inside a local axis, it is not neccessary
- for data to have same size.
- In fact, data can have larger size than local axis.
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- CALL xios_set_axis_attr("axis_A", data_begin=-1, data_n=n+2)
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- For local axis_A, the negative value of data_begin indicates that data is
- larger than local axis, the valid part of data needs extracted from the
- real data.
- If data_begin has a positive value, that means data size is smaller than
- local axis.
- The default value of data_begin is 0, which implies that local data fit
- into local axis properly.
-
- \end_layout
- \begin_layout Standard
- Loal data can be defined with:
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- CALL xios_set_axis_attr("axis_A",data_index=data)
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- with
- \end_layout
- \begin_layout Itemize
- data = {-1,0,1,2,3}
- \end_layout
- \begin_layout Subsection
- Value
- \end_layout
- \begin_layout Standard
- Value of axis plays a same role as longitude and latitude of domain.
- As local data, it can be distributed among processes.
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- CALL xios_set_axis_attr("axis_A", value=valueAxis)
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- with
- \end_layout
- \begin_layout Itemize
- valueAxis = {30, 40, 50}
- \end_layout
- \begin_layout Standard
- Because there is a need of direction of an axis, then comes the attribute
- positive
- \end_layout
- \begin_layout Standard
- \begin_inset listings
- lstparams "language=XML,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
- inline false
- status open
- \begin_layout Plain Layout
- CALL xios_set_axis_attr("axis_A", positive='up')
- \end_layout
- \end_inset
- \end_layout
- \begin_layout Standard
- All attributes of axis can be found in Reference Guide.
- \end_layout
- \begin_layout Standard
- \end_layout
- \end_body
- \end_document
|