Index: XIOS/trunk/doc/XIOS_reference_guide.lyx
===================================================================
--- XIOS/trunk/doc/XIOS_reference_guide.lyx	(revision 796)
+++ XIOS/trunk/doc/XIOS_reference_guide.lyx	(revision 797)
@@ -1003,5 +1003,5 @@
 
 \begin_layout Subsection*
-size: 
+n_glo: 
 \begin_inset Flex Emph
 status collapsed
@@ -1021,14 +1021,14 @@
 
 \begin_layout LyX-Code
-INTEGER :: size
-\end_layout
-
-\begin_layout Standard
-Define the size of the axis.
+INTEGER :: n_glo
+\end_layout
+
+\begin_layout Standard
+Define the global size of the axis.
  This attribute is mandatory.
 \end_layout
 
 \begin_layout Subsection*
-zoom_begin: 
+begin: 
 \begin_inset Flex Emph
 status collapsed
@@ -1048,15 +1048,16 @@
 
 \begin_layout LyX-Code
-INTEGER :: zoom_begin
-\end_layout
-
-\begin_layout Standard
-Define the the beginning of the zoom.
- This must be an index between 1 and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-size
+INTEGER :: begin
+\end_layout
+
+\begin_layout Standard
+Define the the beginning index of the local domain.
+ This attribute is optional.
+ This must be an index between 0 and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n_glo-1
 \end_layout
 
@@ -1064,30 +1065,9 @@
 
 .
- If not specified the default value is 1.
- It must also be evaluated from 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-zoom_end
-\end_layout
-
-\end_inset
-
- and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-zoom_size
-\end_layout
-
-\end_inset
-
- if these are specified.
-\end_layout
-
-\begin_layout Subsection*
-zoom_end: 
+ If not specified the default value is 0.
+\end_layout
+
+\begin_layout Subsection*
+n: 
 \begin_inset Flex Emph
 status collapsed
@@ -1107,15 +1087,16 @@
 
 \begin_layout LyX-Code
-INTEGER :: zoom_end
-\end_layout
-
-\begin_layout Standard
-Define the the end of the zoom.
- This must be an index between 1 and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-size
+INTEGER :: zoom_size
+\end_layout
+
+\begin_layout Standard
+Define the the local size of the axis.
+ This attribute is optional.
+ This must be an integer between 1 and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n_glo
 \end_layout
 
@@ -1128,5 +1109,5 @@
 
 \begin_layout Plain Layout
-size
+n_glo
 \end_layout
 
@@ -1134,94 +1115,5 @@
 
 .
- It must also be evaluated from 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-zoom_begin
-\end_layout
-
-\end_inset
-
- and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-zoom_size
-\end_layout
-
-\end_inset
-
- if these are specified.
-\end_layout
-
-\begin_layout Subsection*
-zoom_size: 
-\begin_inset Flex Emph
-status collapsed
-
-\begin_layout Plain Layout
-integer
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-INTEGER :: zoom_size
-\end_layout
-
-\begin_layout Standard
-Define the the size of the zoom.
- This must be an integer between 1 and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-size
-\end_layout
-
-\end_inset
-
-.
- If not specified the default value is 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-size
-\end_layout
-
-\end_inset
-
-.
- It must also be evaluated from 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-zoom_begin
-\end_layout
-
-\end_inset
-
- and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-zoom_end
-\end_layout
-
-\end_inset
-
- if these are specified.
+ 
 \end_layout
 
@@ -1299,8 +1191,229 @@
 Define the boundaries of each level of a the vertical axis.
  The dimensions of the array must be 
-\begin_inset Formula $2\times\textbf{size}$
+\begin_inset Formula $2\times n$
 \end_inset
 
 .
+\end_layout
+
+\begin_layout Subsection*
+data_begin:
+\emph on
+ integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_begin
+\end_layout
+
+\begin_layout Standard
+Define the beginning index of the field data for the axis.
+ This attribute is an offset regarding the local axis, so the value can
+ be negative.
+ A negative value indicates that only some valid part of the data will extracted
+, for example in the case of a ghost cell.
+ A positive value indicates that the local domain is greater than the data
+ stored in memory.
+ A 0-value means that the local domain matches the data in memory.
+ This attribute is optional and the default value is 0.
+ Otherwise 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_begin
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_n
+\end_layout
+
+\end_inset
+
+ must be defined together.
+\end_layout
+
+\begin_layout Subsection*
+data_n: 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_n
+\end_layout
+
+\begin_layout Standard
+Define the size of the field data for the first axis.
+ This attribute is optional and the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n
+\end_layout
+
+\end_inset
+
+.
+ Otherwise 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_begin
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_n
+\end_layout
+
+\end_inset
+
+ must be defined together.
+\end_layout
+
+\begin_layout Subsection*
+data_index: 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_index
+\end_layout
+
+\begin_layout Standard
+In case of a compressed vertical axis, this attribute define the number
+ of points stored in memory on the local axis.
+\end_layout
+
+\begin_layout Subsection*
+mask: 
+\emph on
+1D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask(:)
+\end_layout
+
+\begin_layout Standard
+Define the mask of the local axis.
+ The masked value will be replaced by the value of the field attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+default_value
+\end_layout
+
+\end_inset
+
+ in the output file.
+\end_layout
+
+\begin_layout Subsection*
+n_distributed_partition: 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: n_distributed_partition
+\end_layout
+
+\begin_layout Standard
+Define the number of local axis in case axis is auto-generated.
+ This attribute is optional and the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+positive: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+enumeration { up, down }
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: positive
+\end_layout
+
+\begin_layout Standard
+Define the direction of vertical axis.
+\end_layout
+
+\begin_layout Subsection*
+axis_ref: string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: axis_ref
+\end_layout
+
+\begin_layout Standard
+Define the reference of the axis.
+ All attributes are inherited from the referenced axis with the classical
+ inheritance mechanism.
+ The value assigned to the referenced axis is transmitted to to current
+ axis.
+ This attribute is optional.
 \end_layout
 
@@ -1351,4 +1464,60 @@
 
 \begin_layout Subsection*
+standard_name: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: standard_name
+\end_layout
+
+\begin_layout Standard
+Define the standard name of the domain, as it will appear in the metadata
+ attached to the domain of the output file.
+ 
+\end_layout
+
+\begin_layout Subsection*
+long_name: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: long_name
+\end_layout
+
+\begin_layout Standard
+Define the long name of the domain, as it will appear in the metadata attached
+ to the domain of the output file.
+ 
+\end_layout
+
+\begin_layout Subsection*
 type: 
 \begin_inset Flex Emph
@@ -1356,5 +1525,5 @@
 
 \begin_layout Plain Layout
-enumeration { regular, curvilinear, unstructured }
+enumeration { rectilinear, curvilinear, unstructured }
 \end_layout
 
@@ -1431,4 +1600,63 @@
 
 \begin_layout Subsection*
+ibegin: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: ibegin
+\end_layout
+
+\begin_layout Standard
+Define the begining index of the first dimension of the local domain.
+ This attribute is optional.
+ This must be an integer between 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni_glo-1
+\end_layout
+
+\end_inset
+
+.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
 ni: 
 \begin_inset Flex Emph
@@ -1454,10 +1682,70 @@
 \begin_layout Standard
 Define the first dimension of the local domain.
- This attribute may be also computed from 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-ibegin
+ This attribute is optional.
+ This must be an integer between 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni_glo
+\end_layout
+
+\end_inset
+
+.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni_glo
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+jbegin: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: jbegin
+\end_layout
+
+\begin_layout Standard
+Define the beginning index of the second dimension of the local domain.
+ This attribute is optional.
+ This must be an integer between 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
 \end_layout
 
@@ -1469,149 +1757,21 @@
 
 \begin_layout Plain Layout
-iend
-\end_layout
-
-\end_inset
-
- attribute value, so this attribute is optional.
- But, if defined, a consistent value must be supplied.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $ni=iend-ibegin+1$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $1\leq ibegin\leq iend\leq ni\_glo$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection*
-ibegin: 
-\begin_inset Flex Emph
-status collapsed
-
-\begin_layout Plain Layout
-integer
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-INTEGER :: ibegin
-\end_layout
-
-\begin_layout Standard
-Define the begining index of the first dimension of the local domain.
- This attribute may be also computed from 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-ni
-\end_layout
-
-\end_inset
-
- and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-iend
-\end_layout
-
-\end_inset
-
- attribute values, so this attribute is optional.
- But, if defined, a consistent value must be supplied.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $ibegin=iend-ni+1$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $1\leq ibegin\leq iend\leq ni\_glo$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection*
-iend: 
-\begin_inset Flex Emph
-status collapsed
-
-\begin_layout Plain Layout
-integer
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-INTEGER :: iend
-\end_layout
-
-\begin_layout Standard
-Define the end index of the first dimension of the local domain.
- This attribute may be also computed from 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-ni
-\end_layout
-
-\end_inset
-
- and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-ibegin
-\end_layout
-
-\end_inset
-
- attribute values, so this attribute is optional.
- But, if defined, a consistent value must be supplied.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $iend=ibegin+ni-1$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $1\leq ibegin\leq iend\leq ni\_glo$
-\end_inset
-
-
+nj_glo-1
+\end_layout
+
+\end_inset
+
+.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+.
 \end_layout
 
@@ -1640,189 +1800,21 @@
 \begin_layout Standard
 Define the second dimension of the local domain.
- This attribute may be also computed from 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-jbegin
-\end_layout
-
-\end_inset
-
- and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-jend
-\end_layout
-
-\end_inset
-
- attribute values, so this attribute is optional.
- But, if defined, a consistent value must be supplied.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $nj=jend-jbegin+1$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $1\leq jbegin\leq jend\leq nj\_glo$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection*
-jbegin: 
-\begin_inset Flex Emph
-status collapsed
-
-\begin_layout Plain Layout
-integer
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-INTEGER :: jbegin
-\end_layout
-
-\begin_layout Standard
-Define the beginning index of the second dimension of the local domain.
- This attribute may be also computed from 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-nj
-\end_layout
-
-\end_inset
-
- and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-jend
-\end_layout
-
-\end_inset
-
- attribute values, so this attribute is optional.
- But, if defined, a consistent value must be supplied.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $jbegin=jend-nj+1$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $1\leq jbegin\leq jend\leq nj\_glo$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection*
-jend: 
-\begin_inset Flex Emph
-status collapsed
-
-\begin_layout Plain Layout
-integer
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-INTEGER :: jend
-\end_layout
-
-\begin_layout Standard
-Define the ending index of the second dimension of the local domain.
- This attribute may be also computed from 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-nj
-\end_layout
-
-\end_inset
-
- and 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-jbegin
-\end_layout
-
-\end_inset
-
- attribute values, so this attribute is optional.
- But, if defined, a consistent value must be supplied.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $jend=jbegin+nj-1$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $1\leq jbegin\leq jend\leq nj\_glo$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection*
-zoom_ni: 
-\emph on
-integer
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-INTEGER :: zoom_ni
-\end_layout
-
-\begin_layout Standard
-Define the size of the zoom on the first dimension on the global domain.
  This attribute is optional.
- The default value is 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-ni
+ This must be an integer between 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nj_glo
 \end_layout
 
@@ -1830,37 +1822,10 @@
 
 .
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $1\leq zoom\_ni\leq ni$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection*
-zoom_ibegin: 
-\emph on
-integer
-\end_layout
-
-\begin_layout Standard
-Fortran
-\end_layout
-
-\begin_layout LyX-Code
-INTEGER :: zoom_ibegin
-\end_layout
-
-\begin_layout Standard
-Define the beginning index on the first dimension of the zoom for the global
- domain.
- This attribute is optional.
- The default value is
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-1
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nj_glo
 \end_layout
 
@@ -1871,102 +1836,5 @@
 
 \begin_layout Subsection*
-zoom_nj: 
-\emph on
-integer
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-INTEGER :: zoom_nj
-\end_layout
-
-\begin_layout Standard
-Define the size of the zoom on the second dimension for the global domain.
- This attribute is optional.
- The default value is
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-nj
-\end_layout
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula $1\leq zoom\_ni\leq ni$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection*
-zoom_jbegin: 
-\emph on
-integer
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-INTEGER :: zoom_jbegin
-\end_layout
-
-\begin_layout Standard
-Define the beginning index on the second dimension of the zoom for the global
- domain.
- This attribute is optional.
- The default value is 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-1
-\end_layout
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Subsection*
-mask: 
-\emph on
-2D-array of bool
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-LOGICAL :: mask(:,:)
-\end_layout
-
-\begin_layout Standard
-Define the mask of the local domain.
- The masked value will be replaced by the value of the field attribute 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-default_value
-\end_layout
-
-\end_inset
-
- in the output file.
-\end_layout
-
-\begin_layout Subsection*
-lonvalue: 
+lonvalue_1d: 
 \emph on
 1D-array of double
@@ -2013,5 +1881,40 @@
 
 \begin_layout Subsection*
-latvalue: 
+lonvalue_2d: 
+\emph on
+2D-array of double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: lonvalue(:,:)
+\end_layout
+
+\begin_layout Standard
+Define the value of the longitude on the local domain.
+ For a cartesian and curvilinear grid, the size of the array will be 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni
+\begin_inset Formula $\times$
+\end_inset
+
+nj
+\end_layout
+
+\end_inset
+
+.
+ This attribute is mandatory.
+ Only lonvalue_1d or lonvalue_2d can be defined.
+\end_layout
+
+\begin_layout Subsection*
+latvalue_1d: 
 \emph on
 1D-array of double
@@ -2048,4 +1951,39 @@
 
 \begin_layout Subsection*
+latvalue_2d: 
+\emph on
+2D-array of double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: latvalue(:,:)
+\end_layout
+
+\begin_layout Standard
+Define the value of the latitude on the local domain.
+ For a cartesian and a curvilinear grid, the size of the array will be 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni
+\begin_inset Formula $\times$
+\end_inset
+
+nj
+\end_layout
+
+\end_inset
+
+.
+ This attribute is mandatory.
+ Only latvalue_1d or latvalue_2d can be defined.
+\end_layout
+
+\begin_layout Subsection*
 nvertex: 
 \emph on
@@ -2068,15 +2006,15 @@
 
 \begin_layout Subsection*
-bounds_lon: 
-\emph on
-1D-array of double
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-DOUBLE PRECISION :: bounds_lon(:)
+bounds_lon_1d: 
+\emph on
+2D-array of double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds_lon(:,:)
 \end_layout
 
@@ -2097,19 +2035,19 @@
 
 \begin_layout Subsection*
-bounds_lat: 
-\emph on
-1D-array of double
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-DOUBLE PRECISION :: bounds_lat(:)
-\end_layout
-
-\begin_layout Standard
-Latitude value of the vertex of the cells.
+bounds_lon_2d: 
+\emph on
+3D-array of double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds_lon(:,:,:)
+\end_layout
+
+\begin_layout Standard
+Longitude value of the vertex of the cells.
 \begin_inset Flex Strong
 status collapsed
@@ -2123,4 +2061,66 @@
  attribute must also be defined.
  This attribute is optional.
+ This attribute is useful when lonvalue_2d is defined.
+ Only bounds_lon_1d or bounds_lon_2d can be defined.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lat_1d: 
+\emph on
+2D-array of double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds_lat(:,:)
+\end_layout
+
+\begin_layout Standard
+Latitude value of the vertex of the cells.
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nvertex
+\end_layout
+
+\end_inset
+
+ attribute must also be defined.
+ This attribute is optional.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lat_2d: 
+\emph on
+3D-array of double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds_lat(:,:)
+\end_layout
+
+\begin_layout Standard
+Latitude value of the vertex of the cells.
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nvertex
+\end_layout
+
+\end_inset
+
+ attribute must also be defined.
+ This attribute is optional.
+ This attribute is useful when latvalue_2d is defined.
+ Only bounds_lat_1d or bounds_lat_2d can be defined.
 \end_layout
 
@@ -2229,5 +2229,16 @@
 
  indicates that the horizontal layer is stored in a 2D array.
- This attribute is mandatory.
+ This attribute is optional.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+.
 \end_layout
 
@@ -2459,23 +2470,4 @@
 
 \begin_layout Subsection*
-data_n_index: 
-\emph on
-integer
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-INTEGER :: data_nindex
-\end_layout
-
-\begin_layout Standard
-In case of a compressed horizontal domain, this attribute define the number
- of points stored in memory on the local domain.
-\end_layout
-
-\begin_layout Subsection*
 data_i_index: 
 \emph on
@@ -2536,15 +2528,90 @@
 
 .
- The size of the array must be 
-\begin_inset Flex Strong
-status collapsed
-
-\begin_layout Plain Layout
-data_nindex
-\end_layout
-
-\end_inset
-
-.
+ This attribute is optional.
+\end_layout
+
+\begin_layout Subsection*
+mask_1d: 
+\emph on
+1D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask(:)
+\end_layout
+
+\begin_layout Standard
+Define the 1-dimension mask of the local domain.
+ The attribute is optional.
+ By default, none value is masked.
+ The masked value will be replaced by the value of the field attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+default_value
+\end_layout
+
+\end_inset
+
+ in the output file.
+ This value is useful in case a field is stored linearly in memory.
+ 
+\end_layout
+
+\begin_layout Subsection*
+mask_2d: 
+\emph on
+2D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask(:,:)
+\end_layout
+
+\begin_layout Standard
+Define the mask of the local domain.
+ The attribute is optional.
+ By default, none value is masked.
+ The masked value will be replaced by the value of the field attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+default_value
+\end_layout
+
+\end_inset
+
+ in the output file.
+ Only mask_2d or mask_1d can be defined.
+\end_layout
+
+\begin_layout Subsection*
+domain_ref: string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: domain_ref
+\end_layout
+
+\begin_layout Standard
+Define the reference of the domain.
+ All attributes are inherited from the referenced domain with the classical
+ inheritance mechanism.
+ The value assigned to the referenced domain is transmitted to to current
+ domain.
  This attribute is optional.
 \end_layout
@@ -2573,36 +2640,18 @@
 
 \begin_layout Subsection*
-domain_ref: string
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-CHARACTER(LEN=*) :: domain_ref
-\end_layout
-
-\begin_layout Standard
-Define the horizontal domain reference of the grid.
- This attribute is mandatory.
-\end_layout
-
-\begin_layout Subsection*
-axis_ref: string
-\end_layout
-
-\begin_layout Standard
-Fortran:
-\end_layout
-
-\begin_layout LyX-Code
-CHARACTER(LEN=*) :: axis_ref
-\end_layout
-
-\begin_layout Standard
-Define the axis reference of the grid.
- This attribute is optional, if not defined, the grid will be considered
- as a 2-Dimensionnal grid without vertical layer.
+description: string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: description
+\end_layout
+
+\begin_layout Standard
+Define the description of the grid.
+ This attribute is optional.
 \end_layout
 
@@ -2610,4 +2659,66 @@
 mask: 
 \emph on
+1D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask(:)
+\end_layout
+
+\begin_layout Standard
+Define the mask of the local 1-dimension grid.
+ Masked value will be replaced by the value of the field attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+default_value
+\end_layout
+
+\end_inset
+
+ in the output file.
+ This attribute is optional.
+ By default, none value is masked.
+\end_layout
+
+\begin_layout Subsection*
+mask: 
+\emph on
+2D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask(:,:)
+\end_layout
+
+\begin_layout Standard
+Define the mask of the local 2-dimension grid.
+ Masked value will be replaced by the value of the field attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+default_value
+\end_layout
+
+\end_inset
+
+ in the output file.
+ This attribute is optional.
+ By default, none value is masked.
+\end_layout
+
+\begin_layout Subsection*
+mask: 
+\emph on
 3D-array of bool
 \end_layout
@@ -2622,5 +2733,5 @@
 
 \begin_layout Standard
-Define the mask of the local grid.
+Define the mask of the local 3-dimension grid.
  Masked value will be replaced by the value of the field attribute 
 \begin_inset Flex Strong
@@ -2634,4 +2745,7 @@
 
  in the output file.
+ This attribute is optional.
+ By default, none value is masked.
+ Only one mask can be defined.
 \end_layout
 
@@ -3173,5 +3287,5 @@
 
 \begin_layout Subsection*
-valid_min: 
+valid_max: 
 \emph on
 double
@@ -3183,5 +3297,5 @@
 
 \begin_layout LyX-Code
-DOUBLE PRECISION :: valid_min
+DOUBLE PRECISION :: valid_max
 \end_layout
 
@@ -3795,7 +3909,7 @@
 
 \begin_layout Subsection*
-type: 
-\emph on
-mode { read, write }
+mode: 
+\emph on
+enumeration { read, write }
 \end_layout
 
@@ -4212,4 +4326,473 @@
 \series default
  will be used.
+\end_layout
+
+\begin_layout Section
+Transformation attribute reference
+\end_layout
+
+\begin_layout Subsection
+interpolate_axis
+\end_layout
+
+\begin_layout Subsection*
+type: 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: type
+\end_layout
+
+\begin_layout Standard
+Define the type of interpolation on an axis.
+ This attribute is optional.
+\end_layout
+
+\begin_layout Subsection*
+order: 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: order
+\end_layout
+
+\begin_layout Standard
+Define a order of interpolation.
+ This attribute is optional.
+ The default value is 2.
+\end_layout
+
+\begin_layout Subsection
+inverse_axis
+\end_layout
+
+\begin_layout Subsection
+zoom_axis
+\end_layout
+
+\begin_layout Subsection*
+begin: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: begin
+\end_layout
+
+\begin_layout Standard
+Define the begining index of the zoomed region on global axis.
+ This attribute is optional.
+ This must be an integer between 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni_glo-1
+\end_layout
+
+\end_inset
+
+ of associated axis.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+n: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: n
+\end_layout
+
+\begin_layout Standard
+Define the size of zoomed region on global axis.
+ This attribute is optional.
+ This must be an integer between 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nj_glo
+\end_layout
+
+\end_inset
+
+ of the associated axis.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nj_glo
+\end_layout
+
+\end_inset
+
+ of the associated axis.
+\end_layout
+
+\begin_layout Subsection
+interpolate_domain
+\end_layout
+
+\begin_layout Subsection*
+file: 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: type
+\end_layout
+
+\begin_layout Standard
+Define the file which contains the weight value to interpolate from domain
+ source to domain destination.
+ This attribute is optional.
+ If not specified, the internal interpolation module will be used.
+\end_layout
+
+\begin_layout Subsection*
+order: 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: order
+\end_layout
+
+\begin_layout Standard
+Define a order of interpolation.
+ This attribute is only for internal interoplation module.
+ This attribute is optional.
+ The default value is 2.
+\end_layout
+
+\begin_layout Subsection
+zoom_domain
+\end_layout
+
+\begin_layout Subsection*
+ibegin: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: ibegin
+\end_layout
+
+\begin_layout Standard
+Define the begining index of the zoomed region on the first dimension of
+ the global domain.
+ This attribute is optional.
+ This must be an integer between 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni_glo-1
+\end_layout
+
+\end_inset
+
+ of the associated dimension of domain.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+ni: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: ni
+\end_layout
+
+\begin_layout Standard
+Define the size of zoomed region on the first dimension of the global domain.
+ This attribute is optional.
+ This must be an integer between 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni_glo
+\end_layout
+
+\end_inset
+
+ of the associated dimension of domain.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni_glo
+\end_layout
+
+\end_inset
+
+ of the dimension of domain.
+\end_layout
+
+\begin_layout Subsection*
+jbegin: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: jbegin
+\end_layout
+
+\begin_layout Standard
+Define the begining index of the zoomed region on the second dimension of
+ the global domain.
+ This attribute is optional.
+ This must be an integer between 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nj_glo-1
+\end_layout
+
+\end_inset
+
+ of the associated dimension of domain.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+nj: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: nj
+\end_layout
+
+\begin_layout Standard
+Define the size of zoomed region on the second dimension of the global domain.
+ This attribute is optional.
+ This must be an integer between 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nj_glo
+\end_layout
+
+\end_inset
+
+ of the associated dimension of domain.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nj_glo
+\end_layout
+
+\end_inset
+
+ of the dimension of domain.
+\end_layout
+
+\begin_layout Subsection
+generate_rectilinear_domain
+\end_layout
+
+\begin_layout Standard
+
 \end_layout
 
Index: XIOS/trunk/doc/inputs/user/Axis.lyx
===================================================================
--- XIOS/trunk/doc/inputs/user/Axis.lyx	(revision 796)
+++ XIOS/trunk/doc/inputs/user/Axis.lyx	(revision 797)
@@ -287,4 +287,8 @@
 \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
@@ -315,5 +319,5 @@
 \begin_layout Plain Layout
 
-   <zoom_axis zoom_begin="1" zoom_size="3"/>
+   <zoom_axis zoom_begin="1" zoom_n="3"/>
 \end_layout
 
@@ -334,6 +338,6 @@
 
 \begin_layout Standard
-The concrete example above says many things: the axis named axis_A_zoom
- is transformed from axis name axis_A with a zoom activity.
+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.
Index: XIOS/trunk/doc/inputs/user/Domain.lyx
===================================================================
--- XIOS/trunk/doc/inputs/user/Domain.lyx	(revision 796)
+++ XIOS/trunk/doc/inputs/user/Domain.lyx	(revision 797)
@@ -321,4 +321,9 @@
 \end_layout
 
+\begin_layout Itemize
+generate_rectilinear_domain: auto generating, distributing a rectilinear
+ domain then filling all mandatory attributes.
+\end_layout
+
 \begin_layout Standard
 It is not difficult to define a transformation: Include type of transformation
@@ -368,6 +373,7 @@
 
 \begin_layout Standard
-The concrete example above says many things: a domain named domain_A_zoom
+The concrete example above tells many things: a domain named domain_A_zoom
  is transformed from domain name domain_A with a zoom activity.
+ The domain_A_zoom is the zoomed region of domain_A.
  The detailed attributes of zoom_domain can be found in reference document,
  but simply it contains the begining and size of zoomed region.
@@ -475,6 +481,6 @@
 
 \begin_layout Standard
-Although xml is helpful to define several configurations, it can not be
- used to customize attributes of domain.
+Although xml is helpful to define several configurations, it is not convenient
+ to customize attributes of domain.
  So it's the turn of Fortran interface.
 \end_layout
@@ -772,6 +778,6 @@
  In case of one-dimensional data, it is only necessary to determine data_ibegin
  and data_ni.
- Although the valid data must be inside a domain, it is not neccessary for
- data to have same size as domain.
+ Although the valid data must be inside a local domain, it is not neccessary
+ for data to have same size as local domain.
  In fact, data can have larger size than domain on each dimension, this
  is often the case of 
@@ -844,5 +850,5 @@
 \end_inset
 
-, local domain occupies the center of the global domain, whereas real data
+, local domain occupies the center of the global domain, where real data
  fill up a larger region.
  Only data inside the local domain, represented by blue cells, are valid.
@@ -938,5 +944,5 @@
 
 \begin_layout Standard
-With the same domain_A, we can have longitude and latitude by calling:
+With the same domain_A, we can set longitude and latitude values by calling:
 \end_layout
 
